Roger Binns wrote: >> John Stanton has correctly pointed out that there is a programming model >> here an application effectively does the cacheing itself by precompiling > > statements at startup. > > That is not caching and it would be unaffected by any caching scheme. > sqlite3_finalize would never be called so nothing would enter the cache. > sqlite3_prepare would be called a few times but the queries would not > be in the cache. This is no different than today. > Correct, compiling all stratements in the application is appropriate for embedded insatllations. Cacheing only achieves a benefit when ad-hoc querires are processed and may be repetitive. This is a special case.
A good approach would be to just have an extra level in the API and perform cacheing if appropriate by calling the higher level function. The architecture of Sqlite is highly supportive of such an approach. A public spritied user might program a set of higher level APIs which maintain a cache of prepared statements, perhaps in an MRU stack, and submit it to the community. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users