[EMAIL PROTECTED] wrote:
Martin Pelletier <[EMAIL PROTECTED]> wrote:
Hello,

I am trying to optimise an SQLite database running on Windows. One of the things I'm looking at is page size. However, a page on sqlite.org (http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows) mentions this:

"Just a note that you must also perform this command [PRAGMA page_size=4096; ] before you start a transaction (despite the optimization hint that every command should be in a transaction)."

Is this still true? Do I need to specify page size before any INSERT or SELECT query, even though it is already set from the moment of database creation? If I don't, what happens?


You only need to do PRAGMA page_size=4096 once, before your first
CREATE TABLE statement.  Once the database exists, the page size
is fixed and can never change.


--
D. Richard Hipp <[EMAIL PROTECTED]>

Perfect. Thank you!

On a side note, that comment on the page (http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows) should really be clarified to reflect what you just told me. It is clearly told that the page_size cannot be changed, but the bit about setting it before every transaction is misleading.

Martin

Reply via email to