SQLite3 - How to set page size?


D

durumdara

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?

Thanks:
dd
 
Ad

Advertisements

I

Ian Kelly

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
 
Ad

Advertisements

D

durumdara

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

Thanks! This was!!!

dd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top