
3 | From Planning to Performance: MongoDB Upgrade Best Practices
Why you should upgrade MongoDB
Not too concerned about upgrading your MongoDB instances? You may want to be! Outdated
versions may lack critical security updates, optimizations, and new features that could result
in data loss, slower response times, and reduced efciency, creating more work for you in the
future. To illustrate, take a look at just a few features that have been included in each new
MongoDB version.
In MongoDB 5.x
• Introduction of the capability for live resharding of databases, meaning users can
change the sharded key for collections as their workloads and databases grow and
evolve without experiencing any database downtime.
• Time-series collections can now be sharded, offering improved scalability and
performance for managing temporal data.
• MongoDB 5.3 saw a new feature called clustered collections, where data is stored
according to the keys in the associated clustered index rather than in the order in
which it was inserted. While they may have slightly slower write performance, they
excel when analytical queries require data to be in the specic order dened by the
clustered index.
In MongoDB 6.x
• Time-series collections in 6.0 now include secondary and compound indexes on
measurements, which improve read performance and new use cases like geo-
indexing.
• MongoDB 6.0 enhances change streams signicantly, and users can now access
the before and after state of changed documents, enabling tasks like updating
entire documents downstream and referencing deleted ones. They also now
support data denition language (DDL) operations, such as creating or dropping
collections and indexes.
• Administrators can now compress and encrypt audit events before saving them to
disk, utilizing their own KMIP-compliant key management system.
In MongoDB 7.x
• The ability to modify time-series data provides greater exibility and control over
your time-based information.
• New operators and variables for aggregation pipelines for more complex and
sophisticated data transformations.
• Wildcard indexes optimize the execution of queries, resulting in faster and more
efcient searches.
• Queryable encryption allows you to query encrypted data while maintaining data
condentiality.
相关文档
评论