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/mongodb/vcore/background-indexing.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,19 +19,19 @@ Background indexing is a technique that enables a database system to perform ind
19
19
20
20
Background indexing can be enabled using the property `enableIndexBuildBackground` set to `true`. All indexes would be created in background except the unique indexes, post enabling the property.
21
21
22
-
If working with smaller SKUs or workloads with higher I/O needs, it becomes necessary to predefine indexes on empty collections and avoid relying on background indexing.
22
+
If working with smaller tiers or workloads with higher I/O needs, it's recommended to predefine indexes on empty collections and avoid relying on background indexing.
23
23
24
24
> [!NOTE]
25
-
> Enabling feature requires raising a support request.
25
+
> Background indexing is a Preview feature. Enabling this feature requires raising a support request.
26
26
27
27
> [!IMPORTANT]
28
-
> Ensure creating unique indexes on an empty collection as those are created in foreground.
28
+
> It is advised to create `unique` indexes on an empty collection as those are created in foreground, which results in blocking of reads and writes.
29
29
>
30
-
> It is vital to create indexes based on query predicates beforehand, while the collection is still empty. It prevents resource contention if pushed on read-write heavy large collection.
30
+
> It is advised to create indexes based on query predicates beforehand, while the collection is still empty. It prevents resource contention if pushed on read-write heavy large collection.
31
31
32
32
## Monitor index build
33
33
34
-
We can learn about the progress of index build with command `currentOp`.
34
+
We can learn about the progress of index build using command `currentOp()`.
- Unique indexes can't be created in the background, it's best to create them on an empty collection and then load the data.
95
-
- Background indexing is performed sequentially within a single collection. However, background indexing can run concurrently across multiple collections.
94
+
- Unique indexes can't be created in the background. It's best to create them on an empty collection and then load the data.
95
+
- Background indexing is performed sequentially within a single collection. However, the number of simultaneous index builds on different collections is configurable (default: 2).
Indexes are structures that improve data retrieval speed by providing quick access to rows in a table. They work by creating an ordered set of pointers to data, often based on key columns. MongoDB vcore utilizes indexes in multiple contexts, including query push down, unique constraints and sharding.
18
+
Indexes are structures that improve data retrieval speed by providing quick access to fields in a collection. They work by creating an ordered set of pointers to data, often based on key fields. Azure Cosmos DB for MongoDB vcore utilizes indexes in multiple contexts, including query push down, unique constraints and sharding.
19
19
20
20
> [!IMPORTANT]
21
-
> The "_id" field is the **only** field indexed by default. It is recommended to add additional indexes based on query filters & predicates to optimize performance.
21
+
> The "_id" field is the **only** field indexed by default & maximum size of the field can be `2 KB`. It is recommended to add additional indexes based on query filters & predicates to optimize performance.
22
22
23
23
## Index types
24
24
@@ -43,9 +43,9 @@ This example application stores articles as documents with the following structu
43
43
44
44
## Single field indexes
45
45
46
-
Single field indexes store information from a single field in a collection. The sort order of the single field index doesn't matter. _id field remains indexed by default.
46
+
Single field indexes store information from a single field in a collection. The sort order of the single field index doesn't matter. `_id` field remains indexed by default.
47
47
48
-
MongoDB vcore supports creating index at following
48
+
Azure Cosmos DB for MongoDB vcore supports creating index at following
One query can use multiple single field indexes where available.
66
66
67
67
> [!NOTE]
68
-
> Azure Cosmos DB for MongoDB vcore allows creating maximum of 64 indexes on a collection.
68
+
> Azure Cosmos DB for MongoDB vcore allows creating maximum of 64 indexes on a collection. Depending on the tier, we can plan extension up to 300 indexes upon request.
0 commit comments