Skip to content

Covering indexes for Mango JSON indexes #4413

Open
@mikerhodes

Description

@mikerhodes

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.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions