Bug #92347 Error in documentation on index extentions
Submitted: 10 Sep 2018 6:55 Modified: 2 May 21:57
Reporter: Øystein Grøvlen Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5+ OS:Any
Assigned to: CPU Architecture:Any

[10 Sep 2018 6:55] Øystein Grøvlen
https://dev.mysql.com/doc/refman/8.0/en/index-extensions.html says:

"The optimizer cannot use the primary key in this case because that comprises columns (i1, i2) and the query does not refer to i2. Instead, the optimizer can use the secondary index k_d on (d), and the execution plan depends on whether the extended index is used."

It is not correct that the primary key cannot be used.  A prefix of either the primary index and the secondary index may be used here.  Which index is selected will be a cost-based decision by the query optimizer.

How to repeat:
Documentation bug.
[2 May 21:57] Jon Stephens
Fixed in mysqldoc rev 61938. Closed.