Weil wir auf einem unserer Server etwas knapp an Diskplatz sind, hatte ich die Idee, das MySQL Feature Datenkompression für InnoDB auszuprobieren. Dieses Feature ist nützlich, wenn Tabellen mit VARCHAR, BLOB oderr TEXT Attributen vorhanden sind.
Um es nicht allzu einfach zu machen ist unsere Tabelle auch noch partitioniert. Sie sieht wie folgt aus:
CREATE TABLE `history_str` (
`itemid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`clock` int(11) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`itemid`,`clock`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (clock)
(PARTITION p2012_kw05 VALUES LESS THAN (1328482800) ENGINE = InnoDB,
PARTITION p2012_kw06 VALUES LESS THAN
[Mehr...]