-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[D1] Adding PRAGMA optimize for D1 #19996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
747eda0
17fe5d1
b580319
5597a3f
39f586a
3ea7f0e
8b07f4f
66756e2
33395c7
412ee7f
b453b8c
0031fda
49412f7
fd7f853
367b34d
83deeb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -411,3 +411,11 @@ PRAGMA defer_foreign_keys = off | |
| ``` | ||
|
|
||
| Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn more about how to work with foreign keys. | ||
|
|
||
| ### `PRAGMA optimize` | ||
|
|
||
| Attempts to [optimize all schemas]() in a database by running various maintenance operations. We recommend running this command after [creating an index](/d1/best-practices/use-indexes/). | ||
|
|
||
| Alternatively, to see all optimizations that would have been performed without actually executing them, run `PRAGMA optimize(-1)`. | ||
|
||
|
|
||
| Refer to [SQLite PRAGMA optimize documentation](https://www.sqlite.org/pragma.html#pragma_optimize) for more information on how the command optimizes a database. | ||
Uh oh!
There was an error while loading. Please reload this page.