I am not not working that close to the SQLite source to talk about sqlite3_step etc. as I am using a VB wrapper. Still, I suppose what you say still applies. As it turns out and can now beforehand (without checking for non-consecutive id numbers) how many records should be fetched, so with that things are in fact simple.
RBS On Sun, Nov 20, 2011 at 2:12 PM, Igor Tandetnik <itandet...@mvps.org> wrote: > Bart Smissaert <bart.smissa...@gmail.com> wrote: >> In fact when doing something as you suggest: >> select * from MyTable where ID <= 14 order by ID desc >> I can make it a lot more efficient by adding a limit as not many >> records will be needed. > > There's no difference between adding a LIMIT N clause to the query, and > simply calling sqlite3_step N times and then resetting or finalizing. > -- > Igor Tandetnik > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users