Re: [sqlite] PRAGMA auto_vacuum
I'd recommend NONE (or 0). If you have fairly balanced insertions and deletions then there will be no excessive disk space consumption, vacuuming won't help much. But with auto-vacuuming turned on you won't have the same performance because additional code will be executed after each transaction. Pavel On Tue, May 11, 2010 at 2:50 PM, Joanne Phamwrote: > Hi All, > I have the database which has a lot of insertion and deletion. Do you have > any recomendation about what value that need to be set for auto_vacuum > in this case to improve the performance for deletion as well as insertion the > new row to the database. (0 | NONE | 1 | FULL | 2 | INCREMENTAL;) > Thanks, > JP > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] PRAGMA auto_vacuum
Hi All, I have the database which has a lot of insertion and deletion. Do you have any recomendation about what value that need to be set for auto_vacuum in this case to improve the performance for deletion as well as insertion the new row to the database. (0 | NONE | 1 | FULL | 2 | INCREMENTAL;) Thanks, JP ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA auto_vacuum
Raviv Shasha wrote: > > Can I run the PRAGMA command without using sqlite3_exec command? > Well, yes you could use the prepared statement APIs, but generally sqlite3_exec() is somewhat easier for statemnts you don't need to repeat (like and insert). > According to the sqlite documentation the PRAGMA vacuum commands are the > following : > > For query -> PRAGMA auto_vacuum; > For Set -> PRAGMA auto_vacuum = 0 | none | 1 | full | 2 | incremental; > > While querying PRAGMA vacuum command, where the retrieved result is > stored? > Do I need to define a variable or special structure for this? > The query form of the pragma commands behave like SQL select statements. This query is conceptually equivalent to: select auto_vacuum from pragmas; Your syntax is correct. Just make sure you do it before you create any tables in the database, as noted in the documentation. > Therefore, auto-vacuuming must be turned on > before any tables are created. It is not possible to enable or > disable auto-vacuum after a table has been created. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA auto_vacuum
Hi, Thanks for your question. Can I run the PRAGMA command without using sqlite3_exec command? According to the sqlite documentation the PRAGMA vacuum commands are the following : For query -> PRAGMA auto_vacuum; For Set -> PRAGMA auto_vacuum = 0 | none | 1 | full | 2 | incremental; While querying PRAGMA vacuum command, where the retrieved result is stored? Do I need to define a variable or special structure for this? I'll appreciate if you can specify the correct PRAGMA syntax. Thanks in advance, -Raviv. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Cote Sent: Monday, March 03, 2008 6:48 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] PRAGMA auto_vacuum Raviv Shasha wrote: > > Sqlite_exec (pDB, "PRAGMA auto_vacuum = 1", NULL, 0, ); > Raviv, That is correct, but you should not the following detail from http://www.sqlite.org/pragma.html > Therefore, auto-vacuuming must be turned on > before any tables are created. It is not possible to enable or > disable auto-vacuum after a table has been created. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PRAGMA auto_vacuum
Raviv Shasha wrote: > > Sqlite_exec (pDB, "PRAGMA auto_vacuum = 1", NULL, 0, ); > Raviv, That is correct, but you should not the following detail from http://www.sqlite.org/pragma.html > Therefore, auto-vacuuming must be turned on > before any tables are created. It is not possible to enable or > disable auto-vacuum after a table has been created. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] PRAGMA auto_vacuum
Hi all, I'll appreciate if anyone can send me the correct syntax for executing PRAGMA auto_vacuum = 1 command. In the sqlite documentation there is only a list of all available PRAGMA commands, but I didn't find any code examples. Do I need to execute the PRAGMA auto_vacuum via sqlite_exec as shown as follows: Sqlite_exec (pDB, "PRAGMA auto_vacuum = 1", NULL, 0, ); Thanks a lot, -Raviv. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users