Skip to content

Commit 66756e2

Browse files
committed
Wording edit
1 parent 8b07f4f commit 66756e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/content/partials/d1/use-pragma-statements.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor
414414

415415
### `PRAGMA optimize`
416416

417-
Attempts to [optimize all schemas]() in a database by running the `ANALYZE` command for each table, if necessary. `ANALYZE` updates an internal table which contain statistics about tables and indices. These statistics helps the query planner to execute the input query more efficiently.
417+
Attempts to optimize all schemas in a database by running the `ANALYZE` command for each table, if necessary. `ANALYZE` updates an internal table which contain statistics about tables and indices. These statistics helps the query planner to execute the input query more efficiently.
418+
419+
When `PRAGMA optimize` runs `ANALYZE`, it sets a limit to ensure the command does not take too long to execute. Alternatively, `PRAGMA optimize` may deem it unnecessary to run `ANALYZE` (for example, if the schema has not changed significantly). In this scenario, no optimizations are made.
418420

419421
We recommend running this command after making any changes to the schema (for example, after [creating an index](/d1/best-practices/use-indexes/)).
420422

0 commit comments

Comments
 (0)