-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sqlite: allow pragmas and statements needed to run the query optimizer
https://www.sqlite.org/lang_analyze.html recommends a bunch of things one can do to optimize the performance of the query planner. Most folks using Durable Objects will probably be best served by just calling `PRAGMA optimize` after making schema changes. A couple of notes about this commit: * `PRAGMA optimize` may call `ANALYZE` on all tables, including the internal `_cf_` tables, so we have to allow `ANALYZE` even on otherwise disallowed table names. * Calls to `ANALYZE`, either directly or via `PRAGMA optimize`, cause the creation of the `sqlite_stat1` table. This caused some noise in sql-test.js as I had to update tests that depend on (a) the particular set of tables in the database and (b) the particular size of the database.
- Loading branch information
Showing
2 changed files
with
43 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters