MySQL Forums
Forum List  »  Partitioning

partitioning
Posted by: gururaj sheth
Date: November 19, 2009 12:39AM

Below is the table and the data related to it .How to do we go ahead and create partitioning for this table .Below table had like 50 million of records.

CREATE TABLE l_play (
Pl_id int(11) not null auto increment
E_Id` int(11) NOT NULL,
F_Id` int(11) DEFAULT NULL,
P_Id` int(11) DEFAULT NULL,
P_T` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`pl_id`),
KEY FK_log_playlog_processor` (`Proc_Id`),
KEY FK_log_playlog_file` (`Fi_Id`),
CONSTRAINT FK_l_pl` FOREIGN KEY (`Fi_Id`) REFERENCESlog_file` (`Fi_Id`),
CONSTRAINT FK_log_prc` FOREIGN KEY (`Proc_Id`) REFERENCES log_processor` (`Proc_Id`),

) ENGINE=InnoDB DEFAULT CHARSET=latin1

Need to partiotion by date .. we get around each day around 1 lakhs of records .. so need to partition for each week or each month .
sample data :


102649, 31, 35,, 16, 2008-05-20 05:49:00.0
102650,1, 35, ,7, 2008-05-20 05:50:00.0
102651,2, 35,, 8, 2008-05-20 05:50:00.0
102652,1, 35,, 7, 2008-05-20 05:52:00.0
102653,5, 35,, 9, 2008-05-20 05:53:00.0
102654,1, 35,, 7, 2008-05-20 05:54:00.0
102655,6, 35,, 10, 2008-05-20 05:55:00.0

Options: ReplyQuote


Subject
Views
Written By
Posted
partitioning
3659
November 19, 2009 12:39AM
2338
November 20, 2009 05:01AM
2190
November 20, 2009 07:47PM


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.