MySQL Forums :: Partitioning :: Does Mysql Date Partition can be created on date time for every day???


Advanced Search

Re: Does Mysql Date Partition can be created on date time for every day???
Posted by: Rick James ()
Date: August 27, 2015 07:40AM

> So in this case KEY will be better correct?

"Better" for maintaining the table. But _not_ better for performance. If, for example, you ask for a 2-day range, it will still scan the entire table. So only a one-day query _might_ hit one partition. That is "WHERE dt_column = '...'" will probably do "partition pruning", but "WHERE DATE(dt_column) = '...'" will _not_.

General rule: If you hide a column (dt_column) inside a function (DATE), an index cannot be used.

10 minutes? Let's see the SELECT. And the EXPLAIN, if possible.

Options: ReplyQuote


Subject Views Written By Posted
Does Mysql Date Partition can be created on date time for every day??? 1567 Akshath Hegde 08/23/2015 12:18AM
Re: Does Mysql Date Partition can be created on date time for every day??? 823 Rick James 08/23/2015 05:55PM
Re: Does Mysql Date Partition can be created on date time for every day??? 819 Akshath Hegde 08/26/2015 02:53AM
Re: Does Mysql Date Partition can be created on date time for every day??? 775 Rick James 08/27/2015 07:40AM


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.