cache is per-connection so if you open and close connections a lot then a large cache won't help your program. The command line app is a single connection so a large cache there will help (although not with the first queries--only subsequent ones).
Synchronous off is dangerous. Search the history for details. Sam ------------------------------------------- Were Hiring! Seeking a passionate developer to join our team building products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -----Original Message----- From: Alberto Simões [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 3:59 AM To: sqlite-users@sqlite.org Subject: [sqlite] Efficiency and Pragmas Hi I am using these pragmas for efficiency in data loading (I hope) PRAGMA page_size = 4096; PRAGMA temp_store = MEMORY; PRAGMA cache_size = 1000000; PRAGMA synchronous = OFF; PRAGMA count_changes = 0; The truth is that adding these pragmas my inserts got quite faster. Now the problem is querying. If I use sqlite3 shell I get answers in one (two) second(s). If I use my program after these pragmas, I get a slooooow query. Is there any good reason for that? Thanks PS: let me know if more detail on the query or database can be handy for answers. Cheers Alberto -- Alberto Simões ---------------------------------------------------------------------------- - To unsubscribe, send email to [EMAIL PROTECTED] ---------------------------------------------------------------------------- - ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------