oyeubugme26 0 Newbie Poster

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_log_playlog` FOREIGN KEY (`Fi_Id`) REFERENCESlog_file` (`Fi_Id`), 
CONSTRAINT FK_log_playlog_prc` FOREIGN KEY (`Proc_Id`) REFERENCESlog_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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.