Got a MySQL project that needs a partitioned table. It's the
ideal candidate really. Historical data that naturally would be
partitioned by date. I need to keep an active window of data and
delete old data quickly without doing DML.
Except partitioning is in 5.1 (more on that later) and I'm on
5.0.
One way I would overcome this limitation in Oracle Standard
Edition would be to have multiple tables that hold a month worth
of data and put a view on top of them. My users might notice a
slight performance degradation, but it would be worth it to drop
the data quickly.
So, I tried the same experiment in MySQL. I created three tables
of this format:
CREATE TABLE `xyz_2007_01` ([Read more]
`id` bigint(10) NOT NULL default '0',
`report_dt` date default NULL,
`acct_id` varchar(8) default NULL,
`some_text` varchar(222) default NULL,
PRIMARY KEY (`id`),
KEY `xyz_rdt_acct_2007_01` …