哪个查询运行速度更快?性能比较:SQL查询中使用的和如
考虑返回200个记录和authorname
是ATLEAST 20个字符长,authorname
是全文索引
select * from quotestable
where quotesauthor like (select Authorname from Authortable where authorid =45)
。
select * from quotestable
where quotesauthor in (select Authorname from Authortable where authorid =45)
为什么不看看每个执行计划? – flaZer
不是问题的一部分,但它可能会产生不同的结果。 – Durus