Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mango $lt and $gt operators are backed by inclusive key ranges #4865

Open
pgj opened this issue Nov 21, 2023 · 0 comments
Open

Mango $lt and $gt operators are backed by inclusive key ranges #4865

pgj opened this issue Nov 21, 2023 · 0 comments

Comments

@pgj
Copy link
Contributor

pgj commented Nov 21, 2023

Mango index scans do not handle the $lt ("less than") and $gt ("greater than") operators efficiently. In case of $lt, inclusive_end=true is always assumed, so e.g. if there was a selector equivalent to age < 20, the key scanned would include 20 and those documents would need filtering out in memory. Similarly, for $gt, the start key is always inclusive, which cannot even be changed, i.e. there is no inclusive_start option. This can cause a bigger impact on the performance of in-memory filtering if the count is high for the documents with the start and end keys.

Investigate the possibilities for making the interval scan exclusive to cut down on the size of the set of elements forwarded for filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant