Re: Partition Pruning
To see how it works, you can look for MONOTONIC in the source.
from item.h:
typedef enum monotonicity_info
{
NON_MONOTONIC, /* none of the below holds */
MONOTONIC_INCREASING, /* F() is unary and (x < y) => (F(x) <= F(y)) */
MONOTONIC_INCREASING_NOT_NULL, /* But only for valid/real x and y */
MONOTONIC_STRICT_INCREASING,/* F() is unary and (x < y) => (F(x) < F(y)) */
MONOTONIC_STRICT_INCREASING_NOT_NULL /* But only for valid/real x and y */
} enum_monotonicity_info;
It has to search the first partition if the partitioning function is MONOTONIC_*_INCREASING_NOT_NULL (only TO_DAYS is). So if the partitioning function is '(int_col)' it will never look for a NULL for a range query.
If you use the COLUMNS partitioning in 5.5 you can use a DATE/DATETIME column directly and it will not need the TO_DAYS() function and will not have this problem.
Subject
Views
Written By
Posted
4262
September 17, 2010 06:04AM
1634
September 17, 2010 06:43AM
1759
September 21, 2010 02:41PM
1633
September 21, 2010 04:33PM
1646
September 23, 2010 09:17AM
1765
September 28, 2010 10:51AM
1571
September 28, 2010 04:52PM
Re: Partition Pruning
2207
September 29, 2010 04:49AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.