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: Akshath Hegde ()
Date: August 26, 2015 02:53AM

Hi Rick,
Thanks for quick reply.

1. I have table with 50 lakh records (50,00,000). This table will be queried every 15min. But query execution time is more compare, It taking more than 10min. to fetch records.

So if i create partition, whether i will get high performance?

2. Range partition is not dynamic partition, i have to create partition for each date by specifying range in partition.

But in KEY partition just have to specify column name.

EXAMPLE :
CREATE TABLE dummy_table (c1 datetime not null)
PARTITION BY RANGE(TO_DAYS(c1)) (
PARTITION p0 VALUES LESS THAN (-5),
PARTITION p1 VALUES LESS THAN (0),
PARTITION p2 VALUES LESS THAN (100),
PARTITION p3 VALUES LESS THAN (200),
PARTITION p4 VALUES LESS THAN (MAXVALUE)
);


KEY Partition :
CREATE TABLE members (
c1 DATETIME NOT NULL
)
PARTITION BY KEY(DATE(c1)) PARTITIONS 366;


So in this case KEY will be better correct?

Please suggest.

Options: ReplyQuote


Subject Views Written By Posted
Does Mysql Date Partition can be created on date time for every day??? 1522 Akshath Hegde 08/23/2015 12:18AM
Re: Does Mysql Date Partition can be created on date time for every day??? 802 Rick James 08/23/2015 05:55PM
Re: Does Mysql Date Partition can be created on date time for every day??? 797 Akshath Hegde 08/26/2015 02:53AM
Re: Does Mysql Date Partition can be created on date time for every day??? 756 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.