Bug #23087 Manual: index merge optimization, key or key_part
Submitted: 8 Oct 2006 11:41 Modified: 9 Oct 2006 16:56
Reporter: KimSeong Loh (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0 OS:none
Assigned to: Paul DuBois CPU Architecture:Any

[8 Oct 2006 11:41] KimSeong Loh
Description:
There are 2 example statements on index merge optimization in this page 
http://dev.mysql.com/doc/refman/5.0/en/index-merge-optimization.html

SELECT * FROM tbl_name WHERE key_part1 = 10 OR key_part2 = 20;
SELECT * FROM tbl_name
  WHERE (key_part1 = 10 OR key_part2 = 20) AND non_key_part=30;

Should the above 2 statements use key1 and key2 instead of key_part1 and key_part2?

I assume key_part means a column in a composite index. If key_part1 and key_part2 are columns of a composite index, I would expect the 2 statements to use a full index scan rather than index merge.

How to repeat:
No steps.
[9 Oct 2006 16:56] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Yes, you are correct. The examples should be amended as you suggest.  Thanks.