explain
select a.id,a.cid,a.title,a.`date`,a.description,b.ctitle,b.cname from tb_2_content as a left join tb_2_category as b on (a.cid=b.cid) order by id desc limit 6a是文章表,id为PK,cid为普通索引(分类ID)
b是分类表,cid为PK
这是读取最新发布的6篇文章,并把对应的分类名称读出来。Explain的结果是:id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a index (NULL) PRIMARY 4 (NULL) 9653
1 SIMPLE b eq_ref PRIMARY PRIMARY 4 minisite.a.cid 1
请教下各位,Extra为空值是代表什么意思?是最好还是最坏?谢谢了
select a.id,a.cid,a.title,a.`date`,a.description,b.ctitle,b.cname from tb_2_content as a left join tb_2_category as b on (a.cid=b.cid) order by id desc limit 6a是文章表,id为PK,cid为普通索引(分类ID)
b是分类表,cid为PK
这是读取最新发布的6篇文章,并把对应的分类名称读出来。Explain的结果是:id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a index (NULL) PRIMARY 4 (NULL) 9653
1 SIMPLE b eq_ref PRIMARY PRIMARY 4 minisite.a.cid 1
请教下各位,Extra为空值是代表什么意思?是最好还是最坏?谢谢了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货