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

Covering indexes for Mango JSON indexes #4413

Open
4 of 6 tasks
mikerhodes opened this issue Feb 3, 2023 · 0 comments
Open
4 of 6 tasks

Covering indexes for Mango JSON indexes #4413

mikerhodes opened this issue Feb 3, 2023 · 0 comments

Comments

@mikerhodes
Copy link
Contributor

mikerhodes commented Feb 3, 2023

Summary

Provide the ability for Mango to answer a query only using an index, when that index contains all fields needed by a query.

This should speed up these queries significantly -- PoC benchmarks indicate 2-5x speedups dependent on the number of documents that need to be read from primary data. (5x seen at p90 response times between 100 and 500 documents read from primary data for a simple one-field query, on a 2022 MacBook Pro using k6.io).

Desired Behaviour

Described in #4410.

Possible Solution

Described in #4410.

Additional context

None needed beyond RFC.

General PRs

  • JSON index selection tests (mango_cursor_view:choose_best_index/2)
  • Add index_rows_read into mango execution stats.
  • Keys only covering index.
  • Add support to index definitions to write values to JSON indexes.
    • Potentially iterate several PRs to add the restrictions and the metrics.
  • Add support for using index values in covering indexes.
  • Inform user of covering index use in _explain.
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

2 participants