Skip to content

Commit b580319

Browse files
committed
Including a line in the best practices section.
1 parent 17fe5d1 commit b580319

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/docs/d1/best-practices/use-indexes.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ This will return output resembling the below:
8282

8383
Note that you cannot modify this table, or an existing index. To modify an index, [delete it first](#remove-indexes) and [create a new index](#create-an-index) with the updated definition.
8484

85+
## Run `PRAGMA optimize`
86+
87+
After creating an index, run [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) to improve your database performance.
88+
8589
## Test an index
8690

8791
Validate that an index was used for a query by prepending a query with [`EXPLAIN QUERY PLAN`](https://www.sqlite.org/eqp.html). This will output a query plan for the succeeding statement, including which (if any) indexes were used.

0 commit comments

Comments
 (0)