On 18 Feb 2019, at 1:15pm, Arun - Siara Logics (cc) <a...@siara.cc> wrote:

> Thank you, for the detailed advice, info and the pointer.  Is there a faster 
> way to query the table using row id, that is, skip the query parsing and 
> planner?

No.  For fastest queries, use "WHERE rowid = <whatever>", and list the columns 
you're interested in specifically.  Do not use "SELECT *".

> I still need the page cache feature and allow for concurrent modification of 
> the row involved, while ensuring determinism by designing so.  I guess 
> sqlite3_exec() would take care of this, but is there a faster way?

If you're allowing for the table row you're reading to be modified, then how 
will your function be deterministic ?  Would changing values in that row not 
lead to a change in the value returned by your function ?  If not, why are you 
looking up the row ?

Note that if you mark that function as deterministic, you cannot rely on SQLite 
calling your function at all.  SQLite may reason "I called that function, with 
those arguments, a few instructions ago, so I already know what the result will 
be.".

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

Reply via email to