Harness the Potential of Parallel Indexing in Amazon DocumentDB with Amazon Web Services

Spread the love



Amazon DocumentDB, a document database service supporting MongoDB workloads, has introduced parallel indexing to decrease index creation time significantly. By using multiple workers simultaneously, the time to create indexes can be reduced by up to 14 times. This feature allows users to leverage multiple CPU cores to improve performance, although it may temporarily overload CPU and I/O resources, impacting existing operations. Users can specify the number of workers to build indexes, enhancing build process performance. Tests on Amazon DocumentDB 5.0 with different numbers of workers demonstrated a 1.46 to 7.42 times faster improvement in creating indexes.

To use parallel indexing, specify the workers option in the createIndexes command on Amazon DocumentDB version 4.0 and higher instance-based clusters with instance types of 2xlarge and higher. It is crucial to choose the right number of workers based on workload and infrastructure. Monitoring the indexing progress can be done using the db.currentOp() command in mongoose. Creating indexes during off-peak hours is advised to minimize the impact on applications.

In conclusion, parallel indexing is a powerful feature in Amazon DocumentDB that can greatly reduce the time required to create new indexes. This enhancement is available in all AWS Regions where Amazon DocumentDB operates without additional costs. By implementing best practices and utilizing the new feature, users can optimize their index creation process efficiently.

Article Source
https://aws.amazon.com/blogs/database/unlock-the-power-of-parallel-indexing-in-amazon-documentdb/