MySQL Forums
Forum List  »  Partitioning

Re: Partition on range date with/without primary key
Posted by: Rick James
Date: April 23, 2009 09:27PM

Please use SHOW CREATE TABLE, not DESCRIBE, to show the table structure.

Do not drop the PRIMARY KEY, instead arrange for the date to be part of the PRIMARY KEY.

Is data_id AUTO_INCREMENT?

How about:
PRIMARY KEY(date_time, data_id),  -- PK must be unique
UNIQUE (data_id) -- presumably this constraint is true?

Do you have other significant SELECTs?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Partition on range date with/without primary key
3255
April 23, 2009 09:27PM


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.