MongoDB Improves Query Language
Written by Kay Ewbank   
Tuesday, 04 August 2020

MongoDB 4.4 has been released with improvements to its query language and sharding. MongoDB is a NoSQL document database that stores its documents in a JSON-like format with schema.

mongodblogo

The first group of updates is to the MongoDB Query Language (MQL), specifically to the Aggregation Pipeline with new Union and Custom Aggregation Expressions.

The new union with aggregation pipeline stage makes it possible to  blend data from multiple collections and aggregation pipelines into a single result set in the database.It provides similar functionality to SQL's UNION ALL operator, but source collections aren’t constrained by needing matching schemas, and Union aggregations can be scaled-out across collections spanning multiple shards. The new support for custom aggregation expressions means developers can define custom expressions in JavaScript and use those as part of an aggregation pipeline. In earlier versions of MongoDB, you could execute custom expressions via MapReduce, but having them available as part of an aggregation pipeline simplifies their use and supports more efficient syntax and execution.

Improvements have also been made to make scaling out more flexible and faster. You can now redefine shard keys at any time without system downtime, and compound hashed shard keys are now supported that distribute load across shards more evenly without losing data locality.

Another addition is support for hedged reads. These minimize latency by submitting read requests to multiple replicas and returning the results as soon as the quickest node responds.

New streaming replication support means messages are now continuously streamed from the primary to secondary nodes. Until this release, secondary replicas would poll the primary, receiving messages in 16MB batches. The developers say their tests have measured performance improvements of up to 50% over high load, high latency networks.

Support has also been added for simultaneous Indexing, meaning new indexes are now built concurrently on the primary and all secondaries, and are available when all eligible nodes in the replica set have successfully created the index. This reduces the chances of replication lag.

mongodblogo

More Information

MongoDB Website

Related Articles

Amazon Ditches MongoDB, Launches Rival

MongoDB 4 Released

MongoDB 4.0 Gets Multi-Doc ACID Support

MongoDB Stitch Makes App Development Easier

MongoDB 3.2 Released 

MonggoDB 3 Announced

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook or Linkedin.

Banner


Istio 1.7 Expands Capabilities for the Hybrid Cloud
25/08/2020

New feature improvements in Istio 1.7, which include control plane upgrades and virtual machine integration, make Istio easier to operate and expands its capabilities for hybrid cloud environments. Fi [ ... ]



FORTRAN - A Breakthrough Computer Language
21/09/2020

The very first successful FORTRAN program ran on September 20, 1954. Invented at IBM by a group led by John Backus, FORTRAN, standing for "FORmula TRANslator" was to first language to crack the proble [ ... ]


More News

graphics

 



 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 04 August 2020 )