On Sat, May 17, 2014 at 4:55 PM, Baruch Burstein <bmburst...@gmail.com>wrote:

> What is the overhead of holding open a prepared statement? If my program is
> not time critical at all (it is mostly UI bound), but every once in a while
> (anywhere from 10 times a second to once every 10 minutes) it needs to run
> a few querys, would it make more sense to prepare all of the querys once at
> the start of the program (40-50 different querys for the whole program, but
> only 2-3 are run at a time), prepare-step-finalize each time as needed, or
> (most likely) it doesn't really make a difference in this situation?
>
>
The TCL interface for SQLite caches the N most recent prepared statements
(where N defaults to 10 but is configurable) and reuses those prepared
statements if the same queries are run again.  That approach seems to work
well in practice.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to