On 18 Feb 2019, at 3:23pm, Charles Leifer <colei...@gmail.com> wrote:

> At some point before actually executing the query I'm calling
> sqlite3_bind...() to set the value of the parameter placeholder. Presumably 
> SQLite would know at that point that a certain index is usable (or in this 
> case, that a certain constraint is relevant)?

SQLite knows before then.  The SQLite query optimizer does not do algebra.  It 
does its job without knowing what values you will plug into the parameters.

Indexes are chosen by looking at how you are comparing certain columns: whether 
you compare a column using "<" or ">" or "=" or some other comparator.  The 
values you're comparing them with are ignored.

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

Reply via email to