Is there (in)official information on the worst and average case runtime of SORT?
I'd like to determine the values for x and n for which the following code segment:
SELECT fields FROM db_table UP TO n ROWS INTO TABLE itab. SORT itab BY whatever. DO x TIMES. READ TABLE itab WITH KEY key BINARY SEARCH ENDDO.
outperforms this code segment:
SELECT fields FROM db_table UP TO n ROWS INTO TABLE itab. DO x TIMES. READ TABLE itab WITH KEY key. ENDDO.
(Assuming that exactly n rows are transferred to the internal table.)
Binary search has a worst case runtime of log n. But I need to know if SORT guarantees a runtime boundary like n log n.
--Florian