Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10449

Re: sort table and binary search

$
0
0

Close. If you know the unique keys then declare the internal tables as hashed then use keys to search. Otherwise use a SORTED TABLE is best practice.

 

The only time to use SORT/READ/BINARY SEARCH is if the sort order is descending.

 

Also, UP TO 1 ROWS and SELECT SINGLE produce identical SQL on the database. Therefore use the latter (SELECT SINGLE) as it is clearer and simpler.


Viewing all articles
Browse latest Browse all 10449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>