Search code examples
performancesqliteoptimizationpragmapage-size

SQLite: Optimal PAGE_SIZE


I read that the default PAGE_SIZE value of 1024 in SQLite has been chosen merely for compatiblity between different platforms and operatings systems.

Since my app runs only on Windows systems, would it be safe to increase it to a larger value (like 4096) or could it have any unwanted side-effects?


Solution

  • The only drawback is that an ill-adjusted page-size could make your database slower. Ultimately, page_size optimization will depend on four factors:

    • platform
    • schema
    • data
    • queries (i.e. usage)

    Test and compare, that's the only way.