Posted On: Feb 29, 2024

Amazon DocumentDB (with MongoDB compatibility) announces support for partial indexes. With partial indexes, developers can create an index on a subset of documents that meet a specific filter criterion. By indexing a subset of data, partial indexes can reduce query times and improve performance during index creation and management.

Partial indexes require less storage and are more likely to fit in instance memory. Amazon DocumentDB already supports unique, sparse and TTL indexing properties, and with the addition of partial index support, customers can now take advantage of an even more efficient way to query data, manage memory and storage, and improve performance. For example, a query for 'In Progress' orders in an eCommerce application can now use a partial index that only includes documents with the status as 'In Progress' from the Orders collection.

Partial Indexes are currently supported in Amazon DocumentDB 5.0 instance-based clusters in all Amazon Web Services regions where Amazon DocumentDB is available, including the Amazon Web Services China (Beijing) Region, operated by Sinnet and the Amazon Web Services China (Ningxia) Region, operated by NWCD. There are no upfront commitments or additional costs to use partial index, and you only pay for the resulting compute, storage, and IO usage. To get started, please refer to Amazon DocumentDB Developer Guide.