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/how-to-create-indexes.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,20 +30,20 @@ When a new document is inserted for the first time or an existing document is up
30
30
For optimal performance, indexes should be created upfront before data is loaded. All document writes, updates and deletes will synchronously update the corresponding indices. If indexes are created after data is ingested, more server resources are consumed to index historical data. Depending on the size of the historical data, this operation is time consuming and impacts steady state read and write performance.
31
31
32
32
> [!NOTE]
33
-
For scenarios where read patterns change and indexes need to be added, background indexing should be enabled, which can be done through a support ticket.
33
+
> For scenarios where read patterns change and indexes need to be added, background indexing should be enabled, which can be done through a support ticket.
34
34
35
35
## For multiple indexes created on historical data, issue nonblocking createIndex commands for each field
36
36
It is not always possible to plan for all query patterns upfront, particularly as application requirements evolve. Changing application needs inevitably requires fields to be added to the index on a cluster with a large amount of historical data.
37
37
38
38
In such scenarios, each createIndex command should be issued asynchronously without waiting on a response from the server.
39
39
40
40
> [!NOTE]
41
-
By default, Azure Cosmos DB for MongoDB vCore responds to a createIndex operation only after the index is fully built on historical data. Depending on the size of the cluster and the volume of data ingested, this can take time and appear as though the server is not responding to the createIndex command.
41
+
> By default, Azure Cosmos DB for MongoDB vCore responds to a createIndex operation only after the index is fully built on historical data. Depending on the size of the cluster and the volume of data ingested, this can take time and appear as though the server is not responding to the createIndex command.
42
42
43
43
If the createIndex commands are being issued through the Mongo Shell, use Ctrl + C to interrupt the command to stop waiting on a response and issue the next set of operations.
44
44
45
45
> [!NOTE]
46
-
Using Ctrl + C to interrupt the createIndex command after it has been issued does not terminate the index build operation on the server. It simply stops the Shell from waiting on a response from the server, while the server asynchronously continues to build the index over the existing documents.
46
+
> Using Ctrl + C to interrupt the createIndex command after it has been issued does not terminate the index build operation on the server. It simply stops the Shell from waiting on a response from the server, while the server asynchronously continues to build the index over the existing documents.
47
47
48
48
## Create Compound Indexes for queries with predicates on multiple fields
49
49
Compound indexes should be used in the following scenarios:
0 commit comments