Home > Database > Mysql Tutorial > body text

SQLSERVER语句 in和exists哪个效率高本人测试证明

WBOY
Release: 2016-06-07 17:39:33
Original
867 people have browsed it

SQLSERVR语句 in和exists哪个效率高自己测试本人测试证明 最近很多人讨论in和exists哪个效率高,今天就自己测试一下 我使用的是客户的数据库GPOSDB(已经有数据) 环境:SQLSERVER2005 Windows7 我的测试条件:两个表作连接根据VC_IC_CardNO字段,查出CT_Inhou

SQLSERVR语句 in和exists哪个效率高自己测试本人测试证明

最近很多人讨论in和exists哪个效率高,今天就自己测试一下

我使用的是客户的数据库GPOSDB(已经有数据)

环境:SQLSERVER2005   Windows7

我的测试条件:两个表作连接根据VC_IC_CardNO字段,香港服务器,查出CT_InhouseCard表中的VC_IC_CardNO(卡号)在CT_FuelingData表中存在的记录

前提:某些人可能在SQL语句中有多个in,或者多个exists,这些情况很难测试效率的,香港虚拟主机,因为大家的条件都不相同

例如下面两个SQL语句

1 SELECT OrderNo, SiteCode, AreaCode 2 FROM SchedulingProgram , ) AND SiteCode IN ( SELECT SiteCode 4 FROM EnvBasicInfo ) AND OrderNo NOT IN ( 6 SELECT OrderNo 7 FROM KK_DeliveryinfoTmp ) ,香港服务器租用

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!