On Mon, Sep 18, 2017 at 11:41 AM, David Wellman <dwell...@ward-analytics.com > wrote:
> [...] there isn't an api that gives this value ** because ** SQLite > doesn't build the full answer set before returning from that first > sqlite3_step function call. > [DD] Well, the answer is more that sometimes it does, and sometimes it doesn't. [DD] So since it cannot make that determination for the general case, it doesn't at all. [DD] Example cases where it can is when there's a sorting step, e.g. an order-by, [DD] and even then only when an index doesn't help getting the rows in the proper [DD] order w/o explicit sorting. Specifically for those queries, often times the full result-set [DD] must be computed before the first _step() can return. But that will never be O(1), [DD] and I think even select count(*) from t is O(N) in SQLite. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users