On 9/18/17, J Decker <[email protected]> wrote: > What if the select had an ORDER BY ? wouldn't it have to pull the full set > of rows ?
Not necessarily. The query planner works hard to try to get the rows to come out naturally in the correct order, without sorting, as doing so makes the query run faster. Sometimes, it is only able to get the rows to come out partially ordered, with subsets of rows needing sorting but not the whole set. In that case too, the final number of output rows is still unknown until the final sqlite3_step() call. -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

