Hello,

On 2018-02-16 13:00, Dominique Devienne wrote:
While you're technically right, I think of SQL as a declarative language,
and as such I'd say giving this information to SQLite is a best practice
IMHO.
Unlikely in this case, but perhaps one day SQLite might be able to optimize
"something" based on it. And in general, not all queries are that simple.
Giving the query planner all possible information should be recommended. My
$0.02. --DD

Indeed, you are absolutely right -- in addition, I have made a silent assumption that OP calls SQLite from C code using a simple construct like ``for ( i = 0; nofrows > i; ++i ) ...step...'' -- there are scenarios where SQLite VDBE's loop can be faster.

Ad. query planner -- I have mentioned that a cost of a full external sorting for WHERE condition can be reduced by a LIMIT clause -- this fact should be obviously considered.

-- best regards

Cezary H. Noweta
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to