Skip to content

Commit c2d7efb

Browse files
d1: pricing - explain deletes (cloudflare#13234)
* d1: pricing - explain deletes * Update content/workers/_partials/_d1-pricing.md Co-authored-by: Maddy <[email protected]> --------- Co-authored-by: Maddy <[email protected]>
1 parent 4bf8c9a commit c2d7efb

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

content/workers/_partials/_d1-pricing.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ _build:
1515

1616
### Definitions
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-databases/use-indexes/) may return fewer rows to your Worker, but is still required to read (scan) more rows to determine which subset to return.
18-
2. Rows written measure how many rows were written to D1 database. A query that `INSERT` 10 rows into a `users` table would count as 10 rows written.
19-
3. 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.
20-
4. Defining [indexes](/d1/build-databases/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.
21-
5. 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.
22-
6. Storage is based on gigabytes stored per month, and is based on the sum of all databases in your account. Tables and indexes both count towards storage consumed.
23-
7. Free limits reset daily at 00:00 UTC. Monthly included limits reset based on your monthly subscription renewal date, which is determined by the day you first subscribed.
24-
8. There are no data transfer (egress) or throughput (bandwidth) charges for data accessed from D1.
18+
2. Rows written also include any rows deleted. A `DELETE * FROM <table>` on a table with 10,000 rows would count as 10,000 rows written and 10,000 rows read (scanned).
19+
3. Rows written measure how many rows were written to D1 database. A query that `INSERT` 10 rows into a `users` table would count as 10 rows written.
20+
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.
21+
5. Defining [indexes](/d1/build-databases/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.
22+
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.
23+
7. Storage is based on gigabytes stored per month, and is based on the sum of all databases in your account. Tables and indexes both count towards storage consumed.
24+
8. Free limits reset daily at 00:00 UTC. Monthly included limits reset based on your monthly subscription renewal date, which is determined by the day you first subscribed.
25+
9. There are no data transfer (egress) or throughput (bandwidth) charges for data accessed from D1.

0 commit comments

Comments
 (0)