You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/nosql/materialized-views.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Materialized views (preview)
3
3
titleSuffix: Azure Cosmos DB for NoSQL
4
-
description: Learn how to efficiently query a base container by using predefined filters in materialized views for Azure Cosmos DB for NoSQL.
4
+
description: Learn how to efficiently query a base container by using predefined filters in materialized views for Azure Cosmos DB for NoSQL. Use Materialized Views as Global Secondary Indexes.
5
5
author: AbhinavTrips
6
6
ms.author: abtripathi
7
7
ms.reviewer: sidandrews
@@ -21,11 +21,11 @@ ms.date: 06/09/2023
21
21
22
22
Applications frequently are required to make queries that don't specify a partition key. In these cases, the queries might scan through all data for a small result set. The queries end up being expensive because they inadvertently run as a cross-partition query.
23
23
24
-
Materialized views, when defined, help provide a way to efficiently query a base container in Azure Cosmos DB by using filters that don't include the partition key. When users write to the base container, the materialized view is built automatically in the background. This view can have a different partition key for efficient lookups. The view also contains only fields that are explicitly projected from the base container. This view is a read-only table.
24
+
Materialized views, when defined, help provide a way to efficiently query a base container in Azure Cosmos DB by using filters that don't include the partition key. When users write to the base container, the materialized view is built automatically in the background. This view can have a different partition key for efficient lookups. The view also contains only fields that are explicitly projected from the base container. This view is a read-only table. The Azure Cosmos DB Materialized Views for NoSQL API, can be used as Global Secondary Indexes for your workloads.
25
25
26
-
With a materialized view, you can:
26
+
With the Azure Cosmos DB Materialized Views (or the Global Secondary Index) for NoSQL API, you can:
27
27
28
-
- Use the view as a lookup or mapping container to persist cross-partition scans that would otherwise be expensive queries.
28
+
- Use the view as a lookup or mapping container to avoid cross-partition scans that would otherwise be expensive queries.
29
29
- Provide a SQL-based predicate (without conditions) to populate only specific fields.
30
30
- Use change feed triggers to create real-time views to simplify event-based scenarios that are commonly stored as separate containers.
31
31
@@ -280,7 +280,6 @@ After the materialized view is created, the materialized view container automati
280
280
281
281
There are a few limitations with the Azure Cosmos DB for NoSQL API materialized view feature while it is in preview:
282
282
283
-
- Materialized views can't be created on a container that existed before support for materialized views was enabled on the account. To use materialized views, create a new container after the feature is enabled.
284
283
- `WHERE` clauses aren't supported in the materialized view definition.
285
284
- You can project only the source container item's JSON `object` property list in the materialized view definition. Currently, the list can contain only one level of properties in the JSON tree.
286
285
- In the materialized view definition, aliases aren't supported for fields of documents.
0 commit comments