日期:2014-05-16 浏览次数:20772 次
mysql> explain select tc.ControlledPCMAC,tc.ControlledPCNickName,tb.CSK300SN,tb.Client_ID from T_BindCSK300 tb left join T_ControlledPC tc on tb.CSK300SN = tc.CSK300SN where tb.Client_ID='6099888bdfe7465098674070d2abd8ff'; +----+-------------+-------+------+-------------------------+-------------------------+---------+---------------------------+-------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+-------------------------+-------------------------+---------+---------------------------+-------+--------------------------+ | 1 | SIMPLE | tb | ref | index_clientid_csk300sn | index_clientid_csk300sn | 153 | const | 1 | Using where; Using index | | 1 | SIMPLE | tc | ref | index_csk300sn_1 | index_csk300sn_1 | 153 | GoToMyCloudDB.tb.CSK300SN | 18215 | | +----+-------------+-------+------+-------------------------+-------------------------+---------+---------------------------+-------+--------------------------+ 2 rows in set mysql> explain select tc.ControlledPCMAC,tc.ControlledPCNickName,tb.CSK300SN,tb.Client_ID from T_BindCSK300 tb left join T_ControlledPC tc on tb.CSK300SN = tc.CSK300SN where tb.Client_ID='6099888bdfe7465098674070d2abd8ff'; +----+-------------+-------+------+-------------------------+-------------------------+---------+---------------------------+------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+-------------------------+-------------------------+---------+---------------------------+------+--------------------------+ | 1 | SIMPLE | tb | ref | index_clientid_csk300sn | index_clientid_csk300sn | 153 | const | 1 | Using where; Using index | | 1 | SIMPLE | tc | ref | index_csk300sn | index_csk300sn | 153 | GoToMyCloudDB.tb.CSK300SN | 478 | | +----+-------------+-------+------+-------------------------+-------------------------+---------+---------------------------+------+--------------------------+