Log in
::
Register
::
Not logged in
Search:
Home
Articles
Editorials
Forums
Scripts
Blogs
QotD
Books
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Advertise
Write for us
It Depends
Browse by Tag : SQL Server,oPASS (
RSS
)
If Exists (Select 1...) vs If Exists (select * ...)
By
Andy Warren
in
It Depends
|
10-30-2007 6:56 PM
|
Categories:
Filed under:
oPASS
,
SQL Server
Rating: (not yet rated)
Rate this
|
Discuss
|
869 Reads
|
102
Reads in Last 30 Days
|
no comments
If exists is a well known way to improve performance because it returns as soon as it matches a single row - at that point it knows the condition is true and there is no need to continue.During a recent
www.opass.org
meeting guest speaker Bill Graziano mentioned that he uses if exists (select 1) instead of if exists (select *) as a performance optimization. Discussion revealed that this was based on a conversation with a MS person at some point, but Bill didn't have online URL to support it. Note that I'm not knocking Bill here, just curious to see if anyone can shed any light on this.
This Blog
Blog Homepage
Author's Profile
Subscribe (RSS)
Subscribe (ATOM)
Subscribe (RSS w/Comments)
Recent Posts
Networking - Part 2
Networking - Part 1
Big Brown: The Untold Story of UPS
The Story of The Aquarium Stand
Investing In Yourself
This Blogger's Tags
ACM
Appearances
Blog
Blog Recommendations
books
Business
cell phone
Code
Code Camp
Community
Employees
Interesting Ideas
Joe Celko
JumpstartTV
LINQ
Magazines
Mentoring
Misc
Money
Networking
Office 2007
OLPC
ONETUG
oPASS
PASS
Patriotism
Performance Tuning
Professional Development
Rant
Replication
Security
Speaking
SQL Server
SQLSaturday
SSC Article
Storage
Stories
Time Management
Tools
Training
User Groups
Wiki
Wikipedia
This Blogger's Blog Categories
Blog Roll
SQL Musings (Steve Jones of SQLServerCentral.com)
oPASS
10x Software Development
Jonathan Schwartz's Weblog
Databases, Infrastructure, and Security
Make Magazine
RocksThoughts - Chris Rock, Software Developer
Jeff Duntemann's ContraPositive Diary
All About Microsoft
Kendal Van Dyke, DBA
This Blogger's Blog Categories
Featured Blogs
John Magnabosco (Jan 2009)
Archive
January 2009
(8)
December 2008
(27)
November 2008
(26)
October 2008
(26)
September 2008
(25)
August 2008
(24)
July 2008
(28)
June 2008
(24)
May 2008
(19)
April 2008
(30)
March 2008
(22)
February 2008
(26)
January 2008
(28)
December 2007
(15)
November 2007
(26)
October 2007
(17)
September 2007
(17)
August 2007
(13)
July 2007
(8)
June 2007
(6)
May 2007
(2)
Get Your Own Blog
If you would like to blog on SQLServerCentral.com then send an email to
webmaster@sqlservercentral.com
.
My Profile
All Blogs
All Bloggers on SQL Server Central
Top Bloggers In The Past 30 Days
Name
Posts
Replies
Steve Jones
36
54
Andy Warren
34
21
Devin Knight
7
5
Tim Mitchell
6
6
Brad M. McGehee
6
5
K. Brian Kelley
5
6
Dugi
2
6
arshad0384
3
0
John Magnabosco
0
6
Hugo Shebbeare SQL [mc]DBA/MCITP Intellabase.com
2
1
Featured Blogs
Aloha DBA
Subscribe to All Blogs
RSS Syndication
Opml
Copyright © 2002-2009 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use