xh_device_record表person_openid為普通INDEX,
drop table if exists _test;
create temporary table _test(openid varchar(32));
insert into _test select '0A2F0EEE010D74368A54ECE7D5AB8D56';
select * from _test;
explain
select *
from _test b
inner join xh_device_record a on a.person_openid = b.openid
-------------------------------------------------------------------------------------------
# id, select_type, table, partitions, type, possible_keys, key, key_len, ref, rows, filtered, Extra
'1', 'SIMPLE', 'b', NULL, 'ALL', NULL, NULL, NULL, NULL, '1', '100.00', NULL
'1', 'SIMPLE', 'a', NULL, 'ALL', NULL, NULL, NULL, NULL, '1419054', '100.00', 'Using where; Using join buffer (Block Nested Loop)'
為毛xh_device_record 用不了person_openid的索引?
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/275221.html
標籤:MySQL
上一篇:MongoDB資料庫誤刪如何恢復
