Bug #28909 Partition pruning section is misleading
Submitted: 5 Jun 2007 23:08 Modified: 6 Jun 2007 14:44
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[5 Jun 2007 23:08] Sergey Petrunya
Description:
The page at 
http://dev.mysql.com/doc/refman/5.1/en/partitioning-pruning.html

says:
<quote>
The query optimiser can perform pruning whenever a WHERE condition can be reduced to either one of the following:

 * partition_column = constant
 * partition_column IN (constant1, constant2, ..., constantN)

In the first case, the optimizer simply....
</quote>

which makes people think that partition pruning doesn't work for BETWEEN, col < const, etc, which is actually not true. Further on that page, there are examples given.

How to repeat:
n/a

Suggested fix:
Re-word the mentioned manual section so that it is not misleading for the readers. A technical explanation of what kinds of intervals are handled is available at:

http://forge.mysql.com/wiki/MySQL_Internals_Optimizer#Partitioning_Intervals

I'm also available to answer questions if that is too technical.

Also, please change the occurence "optimiser" to "optimizer".
[6 Jun 2007 0:10] MySQL Verification Team
Thank you for the bug report.
[6 Jun 2007 11:43] Jon Stephens
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php

As the bug report itself states, the fact that ranges can also be pruned is already made clear in this section, by both the text and the examples given. If the Manual said, "only equality relations can be pruned" or "ranges cannot be pruned", this would be misleading, but the Manual says no such thing. However, it is easy to be mislead by an incomplete reading of this or any other section of the Manual.
[6 Jun 2007 11:54] Sergey Petrunya
What about changing "optimiser" to "optimizer"? Should I report this as a separate bug?
[6 Jun 2007 12:25] Jon Stephens
No need, we're implementing an automated system to handle spelling issues.