当前位置: 代码迷 >> Sql Server >> 请教SQL运行效率
  详细解决方案

请教SQL运行效率

热度:35   发布时间:2016-04-27 15:40:24.0
请问SQL运行效率
id,reid都有索引
-------------------
select   count(id)   from   [tab]   where     id= '* '   reid= '** ' "
------------------
先读取select   top   1   reid   from   [tab]   where     id= '* '
再比较rs( "reid ")是否=**
-------------------------

请问哪一个效率好一些?谢谢!!

------解决方案--------------------
下面的好
  相关解决方案