Re: [sqlite] Execute PRAGMA max_page_count command
"Raviv Shasha" <[EMAIL PROTECTED]> wrote: > Although I limit the sqlite database to 32768 (32K), the db file which > retrieved is equal to 470K. > > What regrading the operations sequence ? Is it correct to first > initialize the sqlite database and then to execute the PRAGMA > max_page_count command or not? > > What can cause this problem? > The max_page_count pragma limits the number of database "pages" not bytes. 32768 pages is 32MiB, assuming a 1KiB page (the default.) -- D. Richard Hipp <[EMAIL PROTECTED]> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Execute PRAGMA max_page_count command
Although I limit the sqlite database to 32768 (32K), the db file which retrieved is equal to 470K. What regrading the operations sequence ? Is it correct to first initialize the sqlite database and then to execute the PRAGMA max_page_count command or not? What can cause this problem? -Raviv. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik Sent: Thursday, February 21, 2008 4:22 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Execute PRAGMA max_page_count command "Raviv Shasha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The problem is although I got the zero value (->SQLITE_OK), the sqlite > database wasn't limited to 32768. How do you determine this? Be aware that max_page_count is not persistent, it's a per-connection option. Once set, queries executed over the same connection will make sure the database doesn't grow over the limit. But other connections, unless they also set the pragma, are not so restricted. Igor Tandetnik ___ 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] Execute PRAGMA max_page_count command
"Raviv Shasha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The problem is although I got the zero value (->SQLITE_OK), the sqlite > database wasn't limited to 32768. How do you determine this? Be aware that max_page_count is not persistent, it's a per-connection option. Once set, queries executed over the same connection will make sure the database doesn't grow over the limit. But other connections, unless they also set the pragma, are not so restricted. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Execute PRAGMA max_page_count command
Thanks for your question, The problem is although I got the zero value (->SQLITE_OK), the sqlite database wasn't limited to 32768. Should I use the syntax : sqlSt = sqlite3_exec(pDB, "PRAGMA max_page_count=32768", NULL, 0,); Thnaks, Raviv. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik Sent: Thursday, February 21, 2008 4:06 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Execute PRAGMA max_page_count command "Raviv Shasha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > sqlSt = sqlite3_exec(pDB, "PRAGMA max_page_count=32768", NULL, 0, > ); > > The sqlite initialization succeeded, but the sqlSt value always > returned as zero. Zero is SQLITE_OK, meaning success. What seems to be the problem? -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925 ___ 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] Execute PRAGMA max_page_count command
"Raviv Shasha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > sqlSt = sqlite3_exec(pDB, "PRAGMA max_page_count=32768", NULL, 0, > ); > > The sqlite initialization succeeded, but the sqlSt value always > returned as zero. Zero is SQLITE_OK, meaning success. What seems to be the problem? -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users