TABLE 2: Performance of Solutions, Time in Milliseconds
Target Value Row Number Binary Search Cursor Self-Join GROUP BY
1 1 90 10 0
5,632 1,027 80 210 3,546
11,264 2,049 80 420 13,700
56,320 10,240 90 2,163 336,966
112,640 20,480 80 4,253 1,342,694