High Efficiency of SQL Server statements in and exists

Source: Internet
Author: User
SQLSERVR statement in and exists which is highly efficient self-test my test proves that many people recently discussed in and exists which is highly efficient, today I will test it myself. I am using the client database GPOSDB (with data already available) Environment: SQLSERVER2005Windows7 my test condition: two tables are connected according to the VC_IC_CardNO field to find the CT_Inhou

SQLSERVR statement in and exists which is highly efficient self-test my test proves that many people recently discussed in and exists which is highly efficient, today I will test it myself. I am using the client database GPOSDB (with data already available) Environment: SQLSERVER2005 Windows7 my test condition: two tables are connected according to the VC_IC_CardNO field to find the CT_Inhou

Which of the following SQLSERVR statements in and exists is highly efficient? test your own test

Recently, many people have discussed the high efficiency of in and exists. Today I will test it myself.

I am using the customer's database GPOSDB (data already exists)

Environment: SQLSERVER2005 Windows7

My test conditions: connect the two tables according to the VC_IC_CardNO field and the Hong Kong server, and find the records in the CT_InhouseCard table VC_IC_CardNO (card number) in the CT_FuelingData table.

Premise: some people may have multiple in or exists in SQL statements, which is difficult to test efficiency. Hong Kong virtual host, because everyone has different conditions.

For example, the following two SQL statements

1 SELECT OrderNo, SiteCode, AreaCode2 FROM SchedulingProgram,) AND SiteCode IN (SELECT SiteCode4FROMEnvBasicInfo) AND OrderNo not in (6 SELECT OrderNo7FROM KK_DeliveryinfoTmp), Hong Kong server rent

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.