Skip to content

Commit daaccc1

Browse files
authored
Merge pull request #50313 from wwlpublish/a0180384e3f8cbc89e953adbe9ad67b2b8c34dc846751ae569848808d2998877-live
Modules/M01-choose-indexes-azure-cosmos-db-sql-api
2 parents 03d8e0f + ee238e4 commit daaccc1

14 files changed

+72
-46
lines changed

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/1-introduction.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.introduction
33
title: Introduction
44
metadata:
5+
adobe-target: true
6+
prefetch-feature-rollout: true
57
title: Introduction
68
description: "Introduction"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
11-
azureSandbox: false
12-
labModal: false
13+
ms.custom:
14+
- N/A
1315
durationInMinutes: 2
1416
content: |
15-
[!include[](includes/1-introduction.md)]
16-
17+
[!include[](includes/1-introduction.md)]

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/2-index-usage.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.index-usage
33
title: Index usage
44
metadata:
5+
adobe-target: true
6+
prefetch-feature-rollout: true
57
title: Index usage
68
description: "Index usage"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
11-
azureSandbox: false
12-
labModal: false
13+
ms.custom:
14+
- N/A
1315
durationInMinutes: 10
1416
content: |
15-
[!include[](includes/2-index-usage.md)]
17+
[!include[](includes/2-index-usage.md)]

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/3-review-read-heavy-index-patterns.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.review-read-heavy-index-patterns
33
title: Review read-heavy index patterns
44
metadata:
5+
adobe-target: true
6+
prefetch-feature-rollout: true
57
title: Review read-heavy index patterns
68
description: "Review read-heavy index patterns"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
11-
azureSandbox: false
12-
labModal: false
13+
ms.custom:
14+
- N/A
1315
durationInMinutes: 5
1416
content: |
15-
[!include[](includes/3-review-read-heavy-index-patterns.md)]
16-
17+
[!include[](includes/3-review-read-heavy-index-patterns.md)]

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/4-review-write-heavy-index-patterns.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.review-write-heavy-index-patterns
33
title: Review write-heavy index patterns
44
metadata:
5+
adobe-target: true
6+
prefetch-feature-rollout: true
57
title: Review write-heavy index patterns
68
description: "Review write-heavy index patterns"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
11-
azureSandbox: false
12-
labModal: false
13+
ms.custom:
14+
- N/A
1315
durationInMinutes: 4
1416
content: |
15-
[!include[](includes/4-review-write-heavy-index-patterns.md)]
16-
17+
[!include[](includes/4-review-write-heavy-index-patterns.md)]

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/5-exercise-optimize-containers-index-policy-common-operations.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.exercise-optimize-containers-index-policy-for-common-operations
33
title: Exercise - Optimize an Azure Cosmos DB for NoSQL container's index policy for common operations
44
metadata:
5+
adobe-target: true
6+
prefetch-feature-rollout: true
57
title: Exercise - Optimize an Azure Cosmos DB for NoSQL container's index policy for common operations
68
description: "Exercise - Optimize an Azure Cosmos DB for NoSQL container's index policy for common operations"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
13+
ms.custom:
14+
- N/A
1115
durationInMinutes: 15
1216
content: |
13-
[!include[](includes/5-exercise-optimize-containers-index-policy-common-operations.md)]
17+
[!include[](includes/5-exercise-optimize-containers-index-policy-common-operations.md)]
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
### YamlMime:ModuleUnit
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.knowledge-check
3-
title: Knowledge check
3+
title: Module assessment
44
metadata:
5-
title: Knowledge check
5+
adobe-target: true
6+
prefetch-feature-rollout: true
7+
title: Module assessment
68
description: "Knowledge check"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
11-
azureSandbox: false
12-
labModal: false
13+
ms.custom:
14+
- N/A
1315
durationInMinutes: 5
1416
quiz:
17+
title: ""
1518
questions:
16-
- content: "The application team wrote a SQL query for Azure Cosmos DB for NoSQL with the following text: ``SELECT * FROM c WHERE c.sku = 'RD3387G'``. Which lookup method will the query engine use for the **sku** filter?"
19+
- content: "Your team has written a SQL query for Azure Cosmos DB for NoSQL with the following text: ``SELECT * FROM c WHERE c.sku = 'RD3387G'``. Which lookup method will the query engine use for the **sku** filter?"
1720
choices:
1821
- content: "``Full scan``"
1922
isCorrect: false
@@ -24,7 +27,7 @@ quiz:
2427
- content: "``Index seek``."
2528
isCorrect: true
2629
explanation: "Correct. The equality filter allows the query engine to perform a seek of a specific value."
27-
- content: "Which property of an indexing policy should be set to disable all indexing for a container?"
30+
- content: "Which property of an indexing policy should you set to disable all indexing for a container?"
2831
choices:
2932
- content: "``indexingMode``"
3033
isCorrect: true
@@ -34,4 +37,4 @@ quiz:
3437
explanation: "Incorrect. The ``excludedPaths`` property determines which paths are excluded from the index, not whether the indexer runs."
3538
- content: "``automatic``"
3639
isCorrect: false
37-
explanation: "Incorrect. Disabling ``automatic`` indexing using a boolean value of ``false`` doesn't disable all indexing for the container."
40+
explanation: "Incorrect. Disabling ``automatic`` indexing using a boolean value of ``false`` doesn't disable all indexing for the container."

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/7-summary.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
uid: learn.wwl.choose-indexes-azure-cosmos-db-sql-api.summary
33
title: Summary
44
metadata:
5+
adobe-target: true
6+
prefetch-feature-rollout: true
57
title: Summary
68
description: "Summary"
7-
ms.date: 04/02/2025
9+
ms.date: 05/07/2025
810
author: wwlpublish
911
ms.author: calopez
1012
ms.topic: unit
11-
azureSandbox: false
12-
labModal: false
13+
ms.custom:
14+
- N/A
1315
durationInMinutes: 2
1416
content: |
15-
[!include[](includes/7-summary.md)]
17+
[!include[](includes/7-summary.md)]

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/includes/1-introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ After completing this module, you'll be able to:
44

55
- Customize an indexing policy for read-heavy workloads
66
- Customize an indexing policy for write-heavy workloads
7+

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/includes/2-index-usage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The query engine evaluates query filters and then traverses the index of your co
77
| **Full scan** | The query engine will load the items, in their entirety, to the transactional store to evaluate the filters. | This type of scan does not use the index; however, the RU charge for loading items is based on the number of items in the entire container. |
88

99
> [!NOTE]
10-
> An index scan can range in complexity from an efficient and precise index scan, to a more involved expanded index scan, and finally the most complex full index scan.
10+
> An index scan can range in complexity from an efficient and precise index seek, to a more involved expanded index scan, and finally the most complex full index scan.
1111
1212
As a query developer, it’s essential to understand which queries will require a seek vs. a scan. It’s also important to understand which queries cannot use the index and will require a full scan. Specifically, you should optimize your queries to use filter predicates that use the most efficient lookup method.
1313

@@ -124,3 +124,4 @@ The query engine will traverse the tree in the following order:
124124
This binary search moved the query, in complexity, from an index seek to a precise index scan. The query engine scans all possible values in the index, but this is still far more efficient than a full scan of all JSON content. Queries that use range comparisons and string functions often will require the use of an index scan.
125125

126126
There are edge cases where the query engine cannot use the index to evaluate a filter. These cases will require the query engine to load the JSON content of all items into the transactional store before evaluating the filter. Full scans can potentially have significant request unit charges as the charge scales linearly with the total number of items in the container. While full scans are rare, it is essential to know that they are possible when using specific built-in functions in query filters.
127+

learn-pr/wwl-data-ai/choose-indexes-azure-cosmos-db-sql-api/includes/3-review-read-heavy-index-patterns.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ Alternatively, you can exclude all paths and only selectively include the **name
8484

8585
> [!TIP]
8686
> The preferred approach is to index everything by default and selectively exclude specific paths. Changes to the index policy require an index rebuild. Applying this preferred approach allows your application to adapt to schema changes making new properties available for queries immediately.
87+

0 commit comments

Comments
 (0)