Skip to content

Commit 21ed24b

Browse files
authored
[D1] Pricing page edits (#16778)
* Adding minor edits to D1 pricing page. * Redirecting links directly to the GraphQL API section.
1 parent 421ae66 commit 21ed24b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/content/docs/d1/platform/pricing.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ Upgrading to the Workers Paid plan will remove these limits, typically within mi
3535

3636
You will be billed for the additional reads, writes and storage according to [D1's pricing metrics](#billing-metrics).
3737

38-
### When will D1 start billing me?
39-
40-
For [Workers Paid plan](/workers/platform/pricing/#workers) users, Cloudflare intends to start billing for additional usage beyond the included reads, writes and storage by (no earlier than) September 2023. Cloudflare will notify all customers via email (the super administrator address on their account) prior to this change.
41-
4238
### How can I estimate my (eventual) bill?
4339

4440
Every query returns a `meta` object that contains a total count of the rows read (`rows_read`) and rows written (`rows_written`) by that query. For example, a query that performs a full table scan (for instance, `SELECT * FROM users`) from a table with 5000 rows would return a `rows_read` value of `5000`:

src/content/partials/workers/d1-pricing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
| Storage (per GB stored) | 5 GB (total) | First 5 GB included + $0.75 / GB-mo |
1010

1111
:::note[Track your D1 usage]
12-
To accurately track your usage, use the [meta object](/d1/build-with-d1/d1-client-api/#return-object) or the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/d1/). Select your D1 database, then view: Metrics > Row Metrics.
12+
To accurately track your usage, use the [meta object](/d1/build-with-d1/d1-client-api/#return-object), [GraphQL Analytics API](/d1/observability/metrics-analytics/#query-via-the-graphql-api), or the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/d1/). Select your D1 database, then view: Metrics > Row Metrics.
1313
:::
1414

1515
### Definitions
1616

1717
1. Rows read measure how many rows a query reads (scans), regardless of the size of each row. For example, if you have a table with 5000 rows and run a `SELECT * FROM table` as a full table scan, this would count as 5,000 rows read. A query that filters on an [unindexed column](/d1/build-with-d1/use-indexes/) may return fewer rows to your Worker, but is still required to read (scan) more rows to determine which subset to return.
1818
2. Rows written measure how many rows were written to D1 database. Write operations include `INSERT`, `UPDATE`, and `DELETE`. Each of these operations contribute towards rows written. A query that `INSERT` 10 rows into a `users` table would count as 10 rows written.
19-
3. DDL operations (for example, `CREATE`, `ALTER`, and `DROP`) are used to define or modify the structure of a database. They may contribute to a mix of read rows and write rows. Ensure you are accurately tracking your usage through the available tools.
19+
3. DDL operations (for example, `CREATE`, `ALTER`, and `DROP`) are used to define or modify the structure of a database. They may contribute to a mix of read rows and write rows. Ensure you are accurately tracking your usage through the available tools ([meta object](/d1/build-with-d1/d1-client-api/#return-object), [GraphQL Analytics API](/d1/observability/metrics-analytics/#query-via-the-graphql-api), or the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/d1/)).
2020
4. Row size or the number of columns in a row does not impact how rows are counted. A row that is 1 KB and a row that is 100 KB both count as one row.
2121
5. Defining [indexes](/d1/build-with-d1/use-indexes/) on your table(s) reduces the number of rows read by a query when filtering on that indexed field. For example, if the `users` table has an index on a timestamp column `created_at`, the query `SELECT * FROM users WHERE created_at > ?1` would only need to read a subset of the table.
2222
6. Indexes will add an additional written row when writes include the indexed column, as there are two rows written: one to the table itself, and one to the index. The performance benefit of an index and reduction in rows read will, in nearly all cases, offset this additional write.

0 commit comments

Comments
 (0)