mysql優化---in型子查詢,exists子查詢,from 型子查詢

in型子查詢引出的陷阱:(掃更少的行,不要臨時表,不要文件排序就快) 題: 在ecshop商城表中,查詢6號欄目的商品, (注,6號是一個大欄目) 最直觀的: mysql> select goods_id,cat_id,goods_name from goods where cat_id in (select cat_id from category where parent_id=6);
相關文章
相關標籤/搜索