SQLite3 - How to set page size?

Ian Kelly ian.g.kelly at gmail.com
Thu Jun 10 14:39:39 EDT 2010


On Thu, Jun 10, 2010 at 12:25 PM, durumdara <durumdara at gmail.com> wrote:
> Hi!
>
> I tried with this:
>
> import sqlite3
> pdb = sqlite3.connect("./copied4.sqlite")
> pcur = pdb.cursor()
> pcur.execute("PRAGMA page_size = 65536;")
> pdb.commit()
> pcur.execute('VACUUM;')
> pdb.commit()
> pcur.execute("PRAGMA page_size")
> rec = pcur.fetchone()
> print rec
> pdb.close()
>
> But never I got bigger page size.
>
> What I do wrong?

According to the documentation, "The page size must be a power of two
greater than or equal to 512 and less than or equal to
SQLITE_MAX_PAGE_SIZE. The maximum value for SQLITE_MAX_PAGE_SIZE  is
32768."

Cheers,
Ian



More information about the Python-list mailing list