Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make partition pruning support complex partition expression #565

Open
zhexuany opened this issue Feb 13, 2019 · 0 comments
Open

make partition pruning support complex partition expression #565

zhexuany opened this issue Feb 13, 2019 · 0 comments

Comments

@zhexuany
Copy link
Contributor

zhexuany commented Feb 13, 2019

Say, we have a schema

 

CREATE TABLE `p_t` (
 `id` int(11) DEFAULT NULL,
 `name` varchar(50) DEFAULT NULL,
 `y` date DEFAULT NULL,
 index `idx_y`(`y`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
PARTITION BY RANGE ( year(y) ) (
 PARTITION p0 VALUES LESS THAN (1992),
 PARTITION p1 VALUES LESS THAN (1995),
 PARTITION p2 VALUES LESS THAN (1998)
)

 

select * from p_t where y > '1995-10-10' and y < '1997-10-10' should only access p1. 

 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants