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
4016
September 17, 2010 06:04AM
1561
September 17, 2010 06:43AM
1685
September 21, 2010 02:41PM
1572
September 21, 2010 04:33PM
1566
September 23, 2010 09:17AM
1696
September 28, 2010 10:51AM
1504
September 28, 2010 04:52PM
Re: Partition Pruning
2128
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.