(smap_ampcs_v5_0_0)> show table status like 'ChannelValue'; +--------------+--------+---------+------------+------------+----------------+--------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +--------------+--------+---------+------------+------------+----------------+--------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | ChannelValue | MyISAM | 10 | Dynamic | 2716182812 | 66 | 179734483160 | 281474976710655 | 1024 | 0 | NULL | 2015-01-28 15:18:06 | 2015-01-28 21:59:38 | NULL | latin1_swedish_ci | NULL | | | +--------------+--------+---------+------------+------------+----------------+--------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ 1 row in set (0.00 sec) (smap_ampcs_v5_0_0)> show create table ChannelValue; +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ChannelValue | CREATE TABLE `ChannelValue` ( `sessionId` mediumint(8) unsigned NOT NULL, `hostId` mediumint(8) unsigned NOT NULL, `sessionFragment` smallint(5) unsigned NOT NULL, `id` int(10) unsigned NOT NULL, `parentId` bigint(20) unsigned DEFAULT NULL, `rctCoarse` int(10) unsigned NOT NULL, `rctFine` smallint(5) unsigned NOT NULL, `sclkCoarse` int(10) unsigned NOT NULL, `sclkFine` int(10) unsigned NOT NULL, `ertCoarse` int(10) unsigned NOT NULL, `ertFine` int(10) unsigned NOT NULL, `scetCoarse` int(10) unsigned NOT NULL, `scetFine` smallint(5) unsigned NOT NULL, `dssId` smallint(5) unsigned NOT NULL, `vcid` int(10) unsigned DEFAULT NULL, `isRealtime` tinyint(3) unsigned NOT NULL, `dnPackedValue` bigint(20) DEFAULT NULL, `dnDoubleValue` double DEFAULT NULL, `dnStringValue` varchar(255) DEFAULT NULL, `eu` double DEFAULT NULL, `flags` set('DN_YELLOW','DN_RED','EU_YELLOW','EU_RED','DN_PINFINITY','DN_NINFINITY','EU_PINFINITY','EU_NINFINITY') NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | +--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) (smap_ampcs_v5_0_0)> ALTER TABLE ChannelValue ADD INDEX reverseIndex(hostId, sessionId, sessionFragment, id), ADD INDEX ertIndex(ertCoarse, ertFine), ADD INDEX scetIndex(scetCoarse, scetFine), ADD INDEX sclkIndex(sclkCoarse, sclkFine);