Josh Gibbs <jgi...@imailds.com> wrote:
> To reiterate from my original question, if we don't add the order by then
> the results come back at a very acceptable speed.  But of course we'd
> then have to iterate through the results ourselves to siphon off the
> top item set that we're after.  I'd really like the DB to do that for me.

Doing that in your application code is likely your best bet. It is possible to 
select top M out of N elements (when M is much smaller than N) much faster than 
sorting all N elements and then taking first M in order. But SQLite doesn't 
implement any such algorithm - it only knows how to sort the whole set.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to