Skip to content

Commit 3e5845b

Browse files
committed
Adding a line to refer index to FAQs regarding index.
1 parent db3cacf commit 3e5845b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/content/docs/d1/build-with-d1/use-indexes.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Indexes are automatically updated when the table and column(s) they reference ar
2222

2323
:::note
2424

25-
Tables that use the default primary key (an `INTEGER` based `ROWID`), or that define their own `INTEGER PRIMARY KEY`, do not need to create an index for that column.
25+
Tables that use the default primary key (an `INTEGER` based `ROWID`), or that define their own `INTEGER PRIMARY KEY`, do not need to create an index for that column.
2626
:::
2727

2828
To create an index on a D1 table, use the `CREATE INDEX` SQL command and specify the table and column(s) to create the index over.
@@ -43,7 +43,7 @@ To create the index on the `customer_id` column, execute the below statement aga
4343

4444
:::note
4545

46-
A common naming format for indexes is `idx_TABLE_NAME_COLUMN_NAMES`, so that you can identify the table and column(s) your indexes are for when managing your database.
46+
A common naming format for indexes is `idx_TABLE_NAME_COLUMN_NAMES`, so that you can identify the table and column(s) your indexes are for when managing your database.
4747
:::
4848

4949
```sql
@@ -98,6 +98,8 @@ Review the `USING INDEX <INDEX_NAME>` output from the query planner, confirming
9898

9999
This is also a fairly common use-case for an index. Finding a user based on their email address is often a very common query type for login (authentication) systems.
100100

101+
Using an index can reduce the number of rows read by a query. You use the `meta` object to estimate your usage. Refer to ["Can I use an index to reduce the number of rows read by a query?"](/d1/platform/pricing/#can-i-use-an-index-to-reduce-the-number-of-rows-read-by-a-query) and ["How can I estimate my (eventual) bill?"](/d1/platform/pricing/#how-can-i-estimate-my-eventual-bill).
102+
101103
## Multi-column indexes
102104

103105
For a multi-column index (an index that specifies multiple columns), queries will only use the index if they specify either *all* of the columns, or a subset of the columns provided all columns to the "left" are also within the query.

0 commit comments

Comments
 (0)