Index Usage for Nested Logical Queries

June 21, 2017

Speaker: Tess Avitabile, Software Engineer, MongoDB 
Level: 300 (Advanced)
Track: How We Build MongoDB

Have you had a case of the horrible ORs? Indexing nested logical queries (ORs inside of ANDs) is traditionally a challenge for databases. In most databases, it’s on the user to ensure their queries are structured in a way that the database can find an indexed solution. In MongoDB 3.6, we recognize more nested logical queries that can utilize indexes.

Theoretical computer scientist and query team engineer Tess Avitabile takes you behind the scenes to the MongoDB query planner. By knowing the internals, you will develop an intuitive understanding for when a nested logical query will have an indexed solution. You will also see how we can now index more nested logical queries by manipulating the tree structure of queries.

What You Will Learn:

How to write better queries with nested $and and $or operators

How to interpret index bounds in explain() output

How the query planner works and how it impacts your application

Previous Presentation
It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?

Speaker: Samantha Ritter, Software Engineer, MongoDB Level: 200 (Intermediate) Track: How We Build MongoDB...

Next Presentation
Best Practices for Managing MongoDB with Ops Manager
Best Practices for Managing MongoDB with Ops Manager

Speaker: Arkadiusz Borucki, Mongo Database Administrator, Amadeus Data Processing GmbH Speaker: Paul Huber...