From 747eda0ddc7fe5aa14eee07dc37491ef425744d9 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 14 Feb 2025 15:27:34 +0000 Subject: [PATCH 01/15] Adding PRAGMA optimize for D1. --- src/content/partials/d1/use-pragma-statements.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index 9870d815c42d63b..bcbcef75455b46b 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -411,3 +411,6 @@ 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` + From 17fe5d10c248b4da691e90757d32c53ef6c518b2 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 14 Feb 2025 16:19:03 +0000 Subject: [PATCH 02/15] Adding PRAGMA optimize definition to partial. --- src/content/partials/d1/use-pragma-statements.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index bcbcef75455b46b..b51bac6b87dd00c 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -414,3 +414,4 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `PRAGMA optimize` +Attempts to optimize the the database by running various maintenance operations. This statement runs `ANALYZE` if needed, which updates SQLite's internal statistics to improve query planning and makes better decisions on index usage. \ No newline at end of file From b5803197b57b12d573a0946318e1b31f89089c07 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 14 Feb 2025 16:22:28 +0000 Subject: [PATCH 03/15] Including a line in the best practices section. --- src/content/docs/d1/best-practices/use-indexes.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/content/docs/d1/best-practices/use-indexes.mdx b/src/content/docs/d1/best-practices/use-indexes.mdx index a83353d7bdba983..0f590ca98fe7c5c 100644 --- a/src/content/docs/d1/best-practices/use-indexes.mdx +++ b/src/content/docs/d1/best-practices/use-indexes.mdx @@ -82,6 +82,10 @@ This will return output resembling the below: 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. +## Run `PRAGMA optimize` + +After creating an index, run [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) to improve your database performance. + ## Test an index 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. From 5597a3f35ce41fb343ecc4d2e477250525ec45f3 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Mon, 17 Feb 2025 16:35:19 +0000 Subject: [PATCH 04/15] Fixing wording, linking to SQLite documentation. --- src/content/partials/d1/use-pragma-statements.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index b51bac6b87dd00c..beaa158f887dfbe 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -414,4 +414,8 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `PRAGMA optimize` -Attempts to optimize the the database by running various maintenance operations. This statement runs `ANALYZE` if needed, which updates SQLite's internal statistics to improve query planning and makes better decisions on index usage. \ No newline at end of file +Attempts to optimize all schemas in a database by running various maintenance operations. + +We recommend running this command after creating an index. + +Refer to [SQLite PRAGMA optimize documentation](https://www.sqlite.org/pragma.html#pragma_optimize) for more information on how the command optimizes a database. \ No newline at end of file From 39f586a03fbe3d6d4a2e0eae05757627837521e4 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 18 Feb 2025 11:59:39 +0000 Subject: [PATCH 05/15] Minor wording update. --- src/content/docs/d1/best-practices/use-indexes.mdx | 8 ++++---- src/content/partials/d1/use-pragma-statements.mdx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/d1/best-practices/use-indexes.mdx b/src/content/docs/d1/best-practices/use-indexes.mdx index 0f590ca98fe7c5c..e866f04c89fecd9 100644 --- a/src/content/docs/d1/best-practices/use-indexes.mdx +++ b/src/content/docs/d1/best-practices/use-indexes.mdx @@ -62,6 +62,10 @@ SELECT * FROM orders WHERE order_date = '2023-05-01' In more complex cases, you can confirm whether an index was used by D1 by [analyzing a query](#test-an-index) directly. +### Run `PRAGMA optimize` + +After creating an index, run the [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) command to improve your database performance. + ## List indexes List the indexes on a database, as well as the SQL definition, by querying the `sqlite_schema` system table: @@ -82,10 +86,6 @@ This will return output resembling the below: 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. -## Run `PRAGMA optimize` - -After creating an index, run [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) to improve your database performance. - ## Test an index 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. diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index beaa158f887dfbe..b8f0fb6efbfd9d6 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -414,8 +414,8 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `PRAGMA optimize` -Attempts to optimize all schemas in a database by running various maintenance operations. +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/). -We recommend running this command after creating an index. +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. \ No newline at end of file From 3ea7f0eb1b379fc15ccb581761e5e8fc9848843e Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 18 Feb 2025 13:54:05 +0000 Subject: [PATCH 06/15] Fixing incorrect description of PRAGMA optimize. --- src/content/partials/d1/use-pragma-statements.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index b8f0fb6efbfd9d6..a49fbab031a8c60 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -414,8 +414,10 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `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/). +Attempts to [optimize all schemas]() in a database by running the `ANALYZE` command. `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. -Alternatively, to see all optimizations that would have been performed without actually executing them, run `PRAGMA optimize(-1)`. +We recommend running this command after making any changes to the schema (for example, after [creating an index](/d1/best-practices/use-indexes/)). -Refer to [SQLite PRAGMA optimize documentation](https://www.sqlite.org/pragma.html#pragma_optimize) for more information on how the command optimizes a database. \ No newline at end of file +{/* 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 `PRAGMA optimize` optimizes a database. \ No newline at end of file From 8b07f4feded1a56b5664a1cf1ab17488df802feb Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 18 Feb 2025 15:47:01 +0000 Subject: [PATCH 07/15] Specifying that ANALYZE may not always run. --- src/content/partials/d1/use-pragma-statements.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index a49fbab031a8c60..a5c3d6f2321c25f 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -414,7 +414,7 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `PRAGMA optimize` -Attempts to [optimize all schemas]() in a database by running the `ANALYZE` command. `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. +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. We recommend running this command after making any changes to the schema (for example, after [creating an index](/d1/best-practices/use-indexes/)). From 66756e2972cf3b0392ba577a3bca7543a268f948 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 18 Feb 2025 15:51:33 +0000 Subject: [PATCH 08/15] Wording edit --- src/content/partials/d1/use-pragma-statements.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index a5c3d6f2321c25f..f656ff6a00ef144 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -414,7 +414,9 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `PRAGMA optimize` -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. +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. + +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. We recommend running this command after making any changes to the schema (for example, after [creating an index](/d1/best-practices/use-indexes/)). From 33395c7e1d5916482072ebe85190cbbdbaa55747 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Wed, 19 Feb 2025 13:20:05 +0000 Subject: [PATCH 09/15] Adding corresponding D1 changelog. --- src/content/release-notes/d1.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/content/release-notes/d1.yaml b/src/content/release-notes/d1.yaml index a28615adcde6b0f..c782639273947ff 100644 --- a/src/content/release-notes/d1.yaml +++ b/src/content/release-notes/d1.yaml @@ -5,11 +5,18 @@ productLink: "/d1/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: + - publish_date: "2025-02-19" + title: D1 supports `PRAGMA optimize` + description: |- + D1 now supports [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) command, which can increase your database performance. + + Cloudflare recommends running this command after a schema change (for example, after creating an index). + - publish_date: "2025-02-04" title: Fixed bug with D1 read-only access via UI and /query REST API. description: |- Fixed a bug with D1 permissions which allowed users with read-only roles via the UI and users with read-only API tokens via the `/query` [REST API](/api/resources/d1/subresources/database/methods/query/) to execute queries that modified databases. UI actions via the `Tables` tab, such as creating and deleting tables, were incorrectly allowed with read-only access. However, UI actions via the `Console` tab were not affected by this bug and correctly required write access. - + Write queries with read-only access will now fail. If you relied on the previous incorrect behavior, please assign the correct roles to users or permissions to API tokens to perform D1 write queries. - publish_date: "2025-01-13" From b453b8cfe8a73c5bf2486bdf0de9eaef16e1db15 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Wed, 19 Feb 2025 13:36:41 +0000 Subject: [PATCH 10/15] Adding changelog entry for DO. --- src/content/release-notes/durable-objects.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/release-notes/durable-objects.yaml b/src/content/release-notes/durable-objects.yaml index 6bf1de69a7c8acc..024c4ade59c5eb6 100644 --- a/src/content/release-notes/durable-objects.yaml +++ b/src/content/release-notes/durable-objects.yaml @@ -5,6 +5,9 @@ productLink: "/durable-objects/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: + - publish_date: "2025-02-19" + description: |- + SQLite-backed Durable Objects now supports `PRAGMA optimize` command. Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements#pragma-optimize) for more information. - publish_date: "2025-02-11" description: |- When Durable Objects generate an "internal error" exception in response to certain failures, the exception message may provide a reference ID that customers can include in support communication for easier error identification. For example, an exception with the new message might look like: `internal error; reference = 0123456789abcdefghijklmn`. From 0031fda73e709677a77e4bc9e8ac775248825f9f Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Wed, 19 Feb 2025 14:44:21 +0000 Subject: [PATCH 11/15] Editing wording to make link more explicit. --- src/content/release-notes/d1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/release-notes/d1.yaml b/src/content/release-notes/d1.yaml index c782639273947ff..fd01e0f6a95ad04 100644 --- a/src/content/release-notes/d1.yaml +++ b/src/content/release-notes/d1.yaml @@ -8,7 +8,7 @@ entries: - publish_date: "2025-02-19" title: D1 supports `PRAGMA optimize` description: |- - D1 now supports [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) command, which can increase your database performance. + D1 now supports `PRAGMA optimize` command, which can increase your database performance. Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) for more information. Cloudflare recommends running this command after a schema change (for example, after creating an index). From 49412f749f793eb30ca0e9f3d55c4ef3223456e1 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Wed, 19 Feb 2025 15:10:42 +0000 Subject: [PATCH 12/15] Introducing glossary term query planner, adding more details. --- src/content/docs/d1/best-practices/use-indexes.mdx | 8 +++++++- src/content/glossary/d1.yaml | 6 ++++++ src/content/partials/d1/use-pragma-statements.mdx | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 src/content/glossary/d1.yaml diff --git a/src/content/docs/d1/best-practices/use-indexes.mdx b/src/content/docs/d1/best-practices/use-indexes.mdx index e866f04c89fecd9..95af2574e90fd58 100644 --- a/src/content/docs/d1/best-practices/use-indexes.mdx +++ b/src/content/docs/d1/best-practices/use-indexes.mdx @@ -6,6 +6,8 @@ sidebar: --- +import { GlossaryTooltip } from "~/components"; + Indexes enable D1 to improve query performance over the indexed columns for common (popular) queries by reducing the amount of data (number of rows) the database has to scan when running a query. ## When is an index useful? @@ -64,7 +66,11 @@ In more complex cases, you can confirm whether an index was used by D1 by [analy ### Run `PRAGMA optimize` -After creating an index, run the [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) command to improve your database performance. +After creating an index, run the `PRAGMA optimize` command to improve your database performance. + +`PRAGMA optimize` runs `ANALYZE` command on each table in the database, which collects statistics on the tables and indices. These statistics allows the query planner to generate the most efficient query plan when executing the user query. + +For more information, refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize). ## List indexes diff --git a/src/content/glossary/d1.yaml b/src/content/glossary/d1.yaml new file mode 100644 index 000000000000000..cffb5e0863db0f4 --- /dev/null +++ b/src/content/glossary/d1.yaml @@ -0,0 +1,6 @@ +--- +productName: D1 +entries: + - term: "query planner" + general_definition: |- + A component in a database management system which takes a user query and generates the most efficient plan of executing that query (the query plan). For example, the query planner decides which indices to use, or which table to access first. diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index f656ff6a00ef144..d4e6e812fcb8c86 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -2,7 +2,7 @@ {} --- -import { Details } from "~/components"; +import { Details, GlossaryTooltip } from "~/components"; The PRAGMA statement examples on this page use the following SQL. @@ -414,7 +414,7 @@ Refer to the [foreign key documentation](/d1/sql-api/foreign-keys/) to learn mor ### `PRAGMA optimize` -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. +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. 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. From fd7f8537ef6de07b2bad3676439ab844e4aa7119 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Wed, 19 Feb 2025 15:24:21 +0000 Subject: [PATCH 13/15] Adding D1 glossary. --- src/content/docs/d1/reference/glossary.mdx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/content/docs/d1/reference/glossary.mdx diff --git a/src/content/docs/d1/reference/glossary.mdx b/src/content/docs/d1/reference/glossary.mdx new file mode 100644 index 000000000000000..81644c5cb3b2251 --- /dev/null +++ b/src/content/docs/d1/reference/glossary.mdx @@ -0,0 +1,13 @@ +--- +title: Glossary +pcx_content_type: glossary +sidebar: + order: 12 + +--- + +import { Glossary } from "~/components" + +Review the definitions for terms used across Cloudflare's D1 documentation. + + From 367b34dcec5f9109fb1d4e41a32f0e24a6f7dfdc Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Mon, 24 Feb 2025 09:15:39 +0000 Subject: [PATCH 14/15] Update src/content/release-notes/d1.yaml Co-authored-by: Vy Ton --- src/content/release-notes/d1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/release-notes/d1.yaml b/src/content/release-notes/d1.yaml index fd01e0f6a95ad04..d3e33c08fc8d777 100644 --- a/src/content/release-notes/d1.yaml +++ b/src/content/release-notes/d1.yaml @@ -8,7 +8,7 @@ entries: - publish_date: "2025-02-19" title: D1 supports `PRAGMA optimize` description: |- - D1 now supports `PRAGMA optimize` command, which can increase your database performance. Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) for more information. + D1 now supports `PRAGMA optimize` command, which can improve database query performance. It is recommended to run this command after a schema change (for example, after creating an index). Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) for more information. Cloudflare recommends running this command after a schema change (for example, after creating an index). From 83deeb427d6c54df3adfb389b939bb671a8f8054 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Mon, 24 Feb 2025 09:21:18 +0000 Subject: [PATCH 15/15] Changing release note wording, explicitly mentioning we don't support PRAGMA optimize(-1). --- src/content/partials/d1/use-pragma-statements.mdx | 6 +++++- src/content/release-notes/d1.yaml | 2 -- src/content/release-notes/durable-objects.yaml | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/content/partials/d1/use-pragma-statements.mdx b/src/content/partials/d1/use-pragma-statements.mdx index d4e6e812fcb8c86..94e86aa3c423a5f 100644 --- a/src/content/partials/d1/use-pragma-statements.mdx +++ b/src/content/partials/d1/use-pragma-statements.mdx @@ -420,6 +420,10 @@ When `PRAGMA optimize` runs `ANALYZE`, it sets a limit to ensure the command doe We recommend running this command after making any changes to the schema (for example, 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)`. */} +:::note +Currently, D1 does not support `PRAGMA optimize(-1)`. + +`PRAGMA optimize(-1)` is a command which displays all optimizations that would have been performed without actually executing them. +::: Refer to [SQLite PRAGMA optimize documentation](https://www.sqlite.org/pragma.html#pragma_optimize) for more information on how `PRAGMA optimize` optimizes a database. \ No newline at end of file diff --git a/src/content/release-notes/d1.yaml b/src/content/release-notes/d1.yaml index d3e33c08fc8d777..cb0c0081dee04c0 100644 --- a/src/content/release-notes/d1.yaml +++ b/src/content/release-notes/d1.yaml @@ -10,8 +10,6 @@ entries: description: |- D1 now supports `PRAGMA optimize` command, which can improve database query performance. It is recommended to run this command after a schema change (for example, after creating an index). Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) for more information. - Cloudflare recommends running this command after a schema change (for example, after creating an index). - - publish_date: "2025-02-04" title: Fixed bug with D1 read-only access via UI and /query REST API. description: |- diff --git a/src/content/release-notes/durable-objects.yaml b/src/content/release-notes/durable-objects.yaml index 024c4ade59c5eb6..6160ad58a02fba9 100644 --- a/src/content/release-notes/durable-objects.yaml +++ b/src/content/release-notes/durable-objects.yaml @@ -7,14 +7,17 @@ productAreaLink: /workers/platform/changelog/platform/ entries: - publish_date: "2025-02-19" description: |- - SQLite-backed Durable Objects now supports `PRAGMA optimize` command. Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements#pragma-optimize) for more information. + SQLite-backed Durable Objects now support `PRAGMA optimize` command, which can improve database query performance. It is recommended to run this command after a schema change (for example, after creating an index). Refer to [`PRAGMA optimize`](/d1/sql-api/sql-statements/#pragma-optimize) for more information. + - publish_date: "2025-02-11" description: |- When Durable Objects generate an "internal error" exception in response to certain failures, the exception message may provide a reference ID that customers can include in support communication for easier error identification. For example, an exception with the new message might look like: `internal error; reference = 0123456789abcdefghijklmn`. + - publish_date: "2024-10-07" title: Alarms re-enabled in (beta) SQLite-backed Durable Object classes description: |- The issue identified with [alarms](/durable-objects/api/alarms/) in [beta Durable Object classes with a SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) has been resolved and alarms have been re-enabled. + - publish_date: "2024-09-27" title: Alarms disabled in (beta) SQLite-backed Durable Object classes description: |-