Amazon DocumentDB (with MongoDB compatibility) announces upgraded query planner that can run queries up to 10x faster
Today, Amazon DocumentDB (with MongoDB compatibility) announces a new query planner, featuring advanced query optimization capabilities and improved performance. PlannerVersion 2.0 for Amazon DocumentDB (with MongoDB compatibility) 5.0 delivers up to 10x performance improvement over the prior version when using find and update operators with indexes. Performance improvements primarily come from using more optimal index plans and enabling index scan support for operators such as negation operators ($neq, $nin) and nested $elementMatch. PlannerVersion 2.0 queries run faster through better cost estimation techniques, optimized algorithms, and enhanced stability.
PlannerVersion 2.0 also simplifies query syntax. For example, you no longer need to provide explicit hints for $regex queries to utilize indexes.
PlannerVersion 2.0 is available in all AWS Regions where Amazon DocumentDB 5.0 is supported. You can enable it by simply modifying the corresponding parameter in your cluster parameter group. The change does not require a cluster restart or cause any downtime. If needed, you can easily revert to using the legacy query planner. To learn more about the new query planner, see Getting Started with New Query Planner.