MySQL Forums
Forum List  »  Partitioning

Re: Best partitioning strategy VS shortest primary key
Posted by: Jérémy Cohen Solal
Date: December 21, 2011 07:37AM

One thing I forgot to explain is that 90% of the requests on these table will be done on current year and last year. But I still need to keep (at least for 4-5 years) the data in database. (the column date will be used with each requests)

This is why I look at MySQL partitions.


> What is the best schema creation practice for this case
CREATE TABLE ... ?? (What does your question mean?)

No I mean what is the best way between theses alternatives:

- PARTITION BY RANGE YEAR(DATE) without PRIMARY KEY

- PARTITION BY RANGE YEAR(DATE) with PRIMARY KEY (ID, DATE)

- PARTITION BY RANGE YEAR(DATE) with PRIMARY KEY (ID) + UNIQUE(DATE, ID)

- Another one?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Best partitioning strategy VS shortest primary key
2189
December 21, 2011 07:37AM


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.