mysql - doesn't partition pruning work if I have range size larger than number of partitions? -



mysql - doesn't partition pruning work if I have range size larger than number of partitions? -

i've 15 1000000 of rows in table , info comes on every 4 sec basis. so, have decided create partitions on each day follows

alter table vehicle_gps partition range(unix_timestamp(gps_time)) ( partition p01 values less (unix_timestamp('2014-01-01 00:00:00')), . . . partition p365 values less (unix_timestamp('2015-01-01 00:00:00')));

i had create 365 partitions shown. each partitioned day contains info around 100 one thousand rows. , if want fetch info giving query

select gps_time vehicle_gps gps_time between '2014-05-01 00:00:00' , '2014-05-06 00:00:00';

i found partitioning pruning not happening. mysql manual says if values in between range larger number of partitions, pruning won't happen. if need of creating partitions tables contain huge info mine. since i'm new partitioning i'm confused, please guide me if i'm wrong, help me in learning.

thank :)

it doesn't work dates, little extract mysql documentation

pruning can used on integer columns of tables partitioned hash or key. example, query cannot utilize pruning because dob date column: select * t4 dob >= '2001-04-14' , dob <= '2005-10-15'; however, if table stores year values in int column, query having year_col >= 2001 , year_col <= 2005 can pruned.

hope helps!

mysql database-partitioning

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -