Re: How to partition my table
Ok, now lets take the real scenario.
With all your suggestions I am now going to study a little further and implement in in mysql-5.1.30
The purpose is to store proxy logs of around 5000 users :D on daily basis.
So I think date wise partitioning will be ok.
I am planning to create a database with 5 tables :
1. Emp details
2. Record of mail sent to user( i.e., when sent,for which date,etc around 5 fields)
3. proxy1
4. proxy2
5. proxy3
Roughly have this table structure in mind for proxy1/2/3
CREATE TABLE `test` (
`dwtime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`ip` varchar(15) NOT NULL default '',
`size` float(15,2) unsigned NOT NULL,
`url` text NOT NULL,
`user` varchar(25) NOT NULL default '',
`mime` varchar(25) default NULL,
`extension` varchar(10) NOT NULL default '',
);
Now the issue is what to make the primary key? As dwtime can get duplicated, even the user, even the size too.
Haven't decided the fields. Let me finalize that and then share with you for your suggestions.