Skip to content

Commit ad5a3f2

Browse files
authored
Fix incorrect collection name references in tuning tips tutorial (#91)
The `customer` collection was incorrectly referenced instead of `ecommerce` in Tip 5 (Index to Avoid Sorting) and Tip 12 (Pushdown Pagination) EXPLAIN output examples and index definition.
1 parent 72b540c commit ad5a3f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tutorial/markdown/couchbase-server/best-practices/n1ql-query-performance-guide/07-tuning-tips-and-advice.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ If you examine the `EXPLAIN` plan for the query near the bottom you will see:
158158
"sort_terms": [
159159
{
160160
"desc": true,
161-
"expr": "cover ((`customer`.`orderDate`))"
161+
"expr": "cover ((`ecommerce`.`orderDate`))"
162162
}
163163
]
164164
}
@@ -167,7 +167,7 @@ If you examine the `EXPLAIN` plan for the query near the bottom you will see:
167167
The Order operator takes all of the documents from the previous operator (IndexScan) and must loop over all of the records and sort them in-memory based on the `ORDER BY` statement. Data is pre-sorted `ASC` by default, with the previous index the `ASC` is implied but would look like:
168168

169169
```sql
170-
CREATE INDEX `idx_order_history2` ON `customer` (
170+
CREATE INDEX `idx_order_history2` ON `ecommerce` (
171171
userId ASC, orderDate ASC, orderTotal ASC, orderId ASC
172172
)
173173
WHERE docType = "order"
@@ -430,7 +430,7 @@ The query is still covered, as before but now the "Limit" and "Offset" are pushe
430430
"offset": "300",
431431
"sort_terms": [{
432432
"desc": true,
433-
"expr": "cover ((`customer`.`productPrice`))"
433+
"expr": "cover ((`ecommerce`.`productPrice`))"
434434
}]
435435
}, {
436436
"#operator": "Offset",

0 commit comments

Comments
 (0)