2 ms·There is a third way: keep the data pre-sorted in the database (via an index).by branko_d 6y agoThere is a third way: keep the data pre-sorted in the database (via an index).