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 index if all requested columns exists in an index, not all rows. #16785

Open
mjonss opened this issue Mar 19, 2024 · 0 comments
Open

Comments

@mjonss
Copy link
Contributor

mjonss commented Mar 19, 2024

Error Report

Please answer the following questions before submitting your issue. Thanks!

  1. What is the URL/path of the document related to this issue?
    https://docs.pingcap.com/tidb/stable/explain-indexes

  2. How would you like to improve it?
    From

TiDB supports the covering index optimization. If all rows can be retrieved from an index, TiDB will skip the second step that is usually required in an IndexLookup. Consider the following two examples:

to

TiDB supports the covering index optimization. If all requested columns can be retrieved from an index, TiDB will skip the second step that is usually required in an IndexLookup. Consider the following two examples:

Since a covering index means that all columns in the index (including possible Primary Key columns added implicitly, to find the full table row), it should be columns and not rows, perhaps with a bit more explaining why this is a very good optimization for using indexes.

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

No branches or pull requests

1 participant