docs icon indicating copy to clipboard operation
docs copied to clipboard

Covering index if all requested columns exists in an index, not all rows.

Open mjonss opened this issue 11 months ago • 0 comments

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.

mjonss avatar Mar 19 '24 11:03 mjonss