MySQL Forums
Forum List  »  Partitioning

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
Re: Does Mysql Date Partition can be created on date time for every day???
2027
August 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.