Re: [sqlite] Efficiency and Pragmas
> >On 4/18/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: >> >>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 If you are under windows you can set pragma CACHE_SIZE to default and try this: System Properties > Advanced Properties > Efficiency > Advanced Options > Memory Use set it to System Cache. This way the system disk cache get more (nearly all) memory. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Efficiency and Pragmas
"Jonas Sandman" <[EMAIL PROTECTED]> wrote: > What is the default setting for PRAGMA cache_size ? > Where is it defined? > The default size is 2000. You can change this at compile-time by setting -DSQLITE_DEFAULT_CACHE_SIZE=12345 -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Efficiency and Pragmas
What is the default setting for PRAGMA cache_size ? Where is it defined? On 4/18/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: 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 --- We're 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 = 100; 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 slow 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] -
RE: [sqlite] Efficiency and Pragmas
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 = 100; 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 slow 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] -
[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 = 100; 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 slow 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] -