尽量先过滤数据再进行表连接,
例如:select a from tblUser inner join tblShop on tblUser.id=tblShop.id
inner join tblThing on tblUser.id=tblThing.id
where tblUser.id=4
改为 select a
from (select * from tbluser where tbluser.id=4) as tblUser
inner join tblShop on tblUser.id=tblShop.id
inner join tblThing on tblUser.id=tblThing.id
MSDN: http://172.18.14.131/LockSmith/Default.aspx
Great site