[SERVER-48888] Support index intersection with one or more wildcard indexes Created: 16/Jun/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Chad Kreimendahl Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Optimization
Participants:

 Description   
  • Allow for a single wildcard index or multiple wildcard indexes to be used concurrently when multiple covered fields are use in a query
  • Allow more than 2 indexes to be used at the same time (3,4,N?), including reuse of the same wildcard but on different fields, concurrently


 Comments   
Comment by Asya Kamsky [ 29/Jun/20 ]

Renamed and reassigned back to Query team.

Comment by David Storch [ 29/Jun/20 ]

Should we change the title of this ticket to something like "Support index intersection plans involving wildcard indexes"?

Comment by Asya Kamsky [ 26/Jun/20 ]

> Right. We basically need a non-sparse wildcard index, because we do often ask if it's null (or not).

Sparse indexes will be used for any query of the form $ne:null

I'm going to remove that part from this ticket as it's not related to the other points.

Comment by Chad Kreimendahl [ 26/Jun/20 ]

Right. We basically need a non-sparse wildcard index, because we do often ask if it's null (or not).

Comment by Asya Kamsky [ 26/Jun/20 ]

If you could point me to documentation saying that, I can get it fixed. It should only say that sparse indexes cannot be used for equality with null.

Comment by Chad Kreimendahl [ 26/Jun/20 ]

According to the documentation, you can't use the index for the above 3 scenarios. So either documentation should be updated (yay?) or we hope code?

Comment by Asya Kamsky [ 26/Jun/20 ]

That doesn’t preclude them from being used for queries where the predicate is not equal null. I did check that before replying and it does work so I’m not sure what the request is for.

Comment by Chad Kreimendahl [ 23/Jun/20 ]

From : https://docs.mongodb.com/manual/core/index-wildcard/

"Wildcard indexes are Sparse Indexes and only contain entries for documents that have the indexed field, even if the index field contains a null value."

Comment by Asya Kamsky [ 23/Jun/20 ]

> Support field not equal to null

chad@onspring.com I'm not sure what this refers to. Field not equal to null is supported by all indexes including wildcard indexes. Can you clarify?

The other two requests look like they are asking for better support for index intersection (including for wildcard indexes)?

Comment by Carl Champain (Inactive) [ 16/Jun/20 ]

Hi chad@onspring.com,

Thank you for the report.
We're passing this ticket along to the appropriate team for further review. Updates will be posted on this ticket as they happen.

Kind regards,
Carl
 

Generated at Thu Feb 08 05:18:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.