Bug #25270 Partition Pruning no working
Submitted: 25 Dec 2006 13:29 Modified: 25 Jan 2007 13:55
Reporter: M.L L Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.14 OS:
Assigned to: CPU Architecture:Any

[25 Dec 2006 13:29] M.L L
Description:
hi, i'm doing some testing to compare differences 
between an non-partition table and partitioned table :

At first i create a non-partition table "syslog" and a partitioned table "syslog_partition" (p0=2006-08-15 and p1= 2006-08-16) both with 70k of records,

- 3.5k on 2006-08-15
- 3.5k on 2006-08-16

WHEN i peform a data selection selection of data in 16th form "syslog", it required 5xxxms to finish the process.

- SELECT * FROM syslog WHERE log_time = "2006-08-16 10:00:00";

WHEN i peform a data selection selection of data in 16th form "syslog_partition", it required 2xxxms to finish the process.

- SELECT * FROM syslog_partition WHERE log_time = "2006-08-16 10:00:00";

Note: in this case, we can say that the query directly go to p2 to perform 
the query, thus increase the performance to retrieve data
------------------------------------------------------------------------

However,

WHEN i peform a data selection selection of data in 16th form "syslog", it required 5xxxms to finish the process.

- SELECT * FROM syslog WHERE log_time >= "2006-08-16 10:00:00" AND log_time <= "2006-08-16 10:30:00";

WHEN i peform a data selection selection of data in 16th form "syslog_partition", it required also 5xxxms to finish the process.

- SELECT * FROM syslog_partition WHERE WHERE log_time >= "2006-08-16 10:00:00" AND log_time <= "2006-08-16 10:30:00";

in this case it seems that the query is go thought all 2 partition instead of directly in p2 partition

Why??

How to repeat:
It seems that the Partition Pruning is only working on condition that defined in WHERE clause with =, other than that like >, <, <=, >=, etc is no working
[25 Dec 2006 13:55] Valeriy Kravchuk
Thank you for a problem report. Please, check in the manual when partition pruning is possible (http://dev.mysql.com/doc/refman/5.1/en/partitioning-pruning.html) and then send complete test case, with CREATE TABLE and test data, that demonstrates a bug (that is, case where partition pruning is possible according to the manual, but does not happen).
[26 Jan 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".