[SERVER-24749] Add index support for Bitwise query operations Created: 23/Jun/16  Updated: 06/Apr/23

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

Type: Improvement Priority: Major - P3
Reporter: Dharmesh Patel Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 25
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-3518 Bitwise query operators Closed
related to DOCS-11140 Note bitwise query expressions cannot... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   
Issue Status as of Feb 11, 2020: Future Consideration

Indexes for bitwise operations currently are not supported and the documentation for Bitwise Query Operators contains this information.

Support for this capability is not a trivial task, and currently, it is not on the short-term roadmap.
We understand that this feature is very desirable and appreciate votes and comments from the community.
MongoDB Developer Community Forum is a good place to discuss this problem. Also, here is an interesting article with some useful information about potential optimizations.

Original description

Creating this issue to include support use of indexes on Bitwise query operations. As mentioned by Ramon Fernandez in SERVER-3518

User Case:
We are heavily using Bitwise query operators to pull count out of collection of 40 million records. Query performance as expected but CPU spikes when queries are running.



 Comments   
Comment by Jonathan Rezende [ 09/Jul/20 ]

It is kinda weird to be able to query with bitwise operators but not index them.

I mean, what is the point to have an operator that you can never use in production?

this would spare us from creating so many boolean fields...

Comment by Thomas Sieverding [ 08/Feb/20 ]

I would deeply appreciate an update on the status of this. I've built a number of algorithms in anticipation of this being included and without this index my entire project is imperiled. I was aware of this issue and proceeded anyway because I didn't think this would be necessary for at least 3 years, but that was in 2017 so IDK. I've actually wanted this since 2014, but I digress. I really hope this happens in the next 6 months.

Comment by Thomas Sieverding [ 07/Jan/20 ]

I've been waiting for this feature for over two years now... is this going to ever get implemented??

Comment by Denis Gvozd [ 24/Aug/19 ]

+1 vote for this feature!

And I think that Igor's comment takes + 100500 votes

Comment by Scott Crunkleton [ 08/Jan/19 ]

Just throwing my vote on this. This would be soooo helpful!

Comment by Jonathan Rezende [ 22/Oct/18 ]

This would be so nice to have.

Unfortunately is still in backlog.

Comment by Igor Novikov [ 17/Dec/17 ]

Worst part is that the documentation mentions nothing about the fact that indexing is not supported for bitwise query operations. So you spend weeks on that system improve that you sure will blow all your teammates minds and grant you any 3 wishes from the company genie. On the small scale development database it's working just fine and you are not noticing that it IS NOT USING THE INDEX. Then you switch to bigger database and cant figure out what is wrong. Then you spend hours to find out why your query planner does not using the index, even after you hint it. Then you find this issue which is 1.5 years old and you can't understand why such an important issue is not a priority. Meanwhile your team member laugh at you but your boss doesn't think this is funny so you get fired. Your wife leaves you and takes the kids. You start smoking and while thinking on indexing, the cigarette falls on the couch starting a fire. While your house is burning you remember that old pc in the basement that had 1265 bitcoins from the days you where mining it. You just stand there and laugh. They find you and take you to the psych ward. You spend the rest of your days indexing numbers on those soft walls. You die.

Comment by Murilo Oliveira [ 12/Dec/17 ]

Nothing yet? 2017 (almost 2018) and I am with the same problem. Impossible use bitwise with mongodb. Any alternative?

Comment by Javier [ 07/Sep/16 ]

Hi Thomas!

Thanks for your reply

Ok, I see, excuse my ignorance. yes, I voted and watching this ticket

Thanks!!

Jaiver.

Comment by Kelsey Schubert [ 06/Sep/16 ]

Hi Javier,

The fixVersion is set to "planned but not scheduled," which indicates that this ticket is currently not scheduled for any future releases.

I see you have already voted for the issue and are watching the ticket - the fixVersion will be updated when the schedule for this improvement changes.

Kind regards,
Thomas

Comment by Javier [ 30/Aug/16 ]

Hi Thomas!!

Any update about this new feature?, support indexes on Bitwise is very important for my project too

Thanks!!

Kind regards.
Javier.

Comment by Kelsey Schubert [ 23/Jun/16 ]

Hi pateld982@gmail.com,

Thanks for creating this ticket - I'm marking it to be scheduled during the next round of planning.

Please continue to watch for updates.

Kind regards,
Thomas

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