Sql server 2008 Linq,SQLServer-性能
我有一个例子:Sql server 2008 Linq,SQLServer-性能,sql-server-2008,Sql Server 2008,我有一个例子: select count(1) from product where (product.loaisanpham = 10) =>结果=100 select count(1) from product where (product.giasanpham > 10000) =>结果=5000000 现在,我有两个问题: 1. select * from product where (product.loaisanpham = 10 and product.giasanpha
select count(1) from product where (product.loaisanpham = 10)
=>结果=100
select count(1) from product where (product.giasanpham > 10000)
=>结果=5000000
现在,我有两个问题:
1. select * from product where (product.loaisanpham = 10 and product.giasanpham > 10000)
2. select * from product where (product.giasanpham > 10000 and product.loaisanpham = 10)
哪一个更快(1)还是(2)?
我正在使用SQL Server。
我记得当我使用mongodb时,(1)更快(2)“哪个更快(1)还是(2)?”-你告诉我们!在mongodb中(1)速度更快。在sql server中,我认为它们是相同的