rendered paste bodyCREATE TABLE `host_links` (
`id` int(11) NOT NULL auto_increment,
`host_link_id` int(11) default NULL,
`device_id` int(11) default NULL,
`rating` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `hl_device_idx` (`device_id`),
KEY `hl_host_link_idx` (`host_link_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4763763 DEFAULT CHARSET=latin1 |
mysql> show indexes from host_links;
+------------+------------+------------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+------------+------------+------------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
| host_links | 0 | PRIMARY | 1 | id | A | 3790409 | NULL | NULL | | BTREE | |
| host_links | 1 | hl_device_idx | 1 | device_id | A | 49873 | NULL | NULL | YES | BTREE | |
| host_links | 1 | hl_host_link_idx | 1 | host_link_id | A | 70192 | NULL | NULL | YES | BTREE | |
+------------+------------+------------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+
3 rows in set (0.09 sec)
CREATE TABLE `device` (
`id` int(11) NOT NULL auto_increment,
`description` varchar(128) NOT NULL default '',
`bus` text,
`driver` text,
`class` text,
`date_added` datetime default NULL,
`device_id` varchar(16) default NULL,
`vendor_id` int(11) default NULL,
`subsys_device_id` int(11) default NULL,
`subsys_vendor_id` int(11) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `description` (`description`)
) ENGINE=MyISAM AUTO_INCREMENT=51876 DEFAULT CHARSET=latin1
mysql> show indexes from device;
+--------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+--------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| device | 0 | PRIMARY | 1 | id | A | 51875 | NULL | NULL | | BTREE | |
| device | 0 | description | 1 | description | A | 51875 | NULL | NULL | | BTREE | |
+--------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.00 sec)