When oil fields enter the last production period, the water holdup in the well is extremely high. Chemical flooding and horizontal well technology are often used to enhance oil recovery. These techniques result in a high downhole fluid viscosity and serious sand production, which leads to the failure of common velocity measurements because of sticking sand, and yields new logging difficulties. This paper presents a method of the velocity measurement of sand-containing oil–water two-phase flow in a super high water holdup pipe diameter based on thermal tracers. The measurement accuracy of the thermal tracer velocity method is related closely to parameters that affect its performance. Parameter optimization is required to improve the measurement accuracy. ANSYS Fluent was used for a numerical simulation of the heat-source shape and material, thermistor probe installation position and fluid heating power, and the method was verified experimentally. The optimal parameters of the thermal tracer flowmeter were obtained by numerical simulation, the heat source material was aluminum and the shape was rectangular. The thermistor probe was located 160–220 mm from the heat source, and the pulse heating power was 350 W. The experiment results show that the accuracy of the thermal tracer flowmeter was 4%, the repeatability was 2.6%, and the measurement accuracy of the flow velocity was unaffected by water holdup and sand.