Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Prakriti Agrawal
»
SARGable
30 posts, Page 1 of 3
1
2
3
»
»»
SARGable
Rate Topic
Display Mode
Topic Options
Author
Message
agrawal.prakriti
agrawal.prakriti
Posted Thursday, February 25, 2010 10:37 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 27, 2010 1:31 PM
Points: 132,
Visits: 101
Comments posted to this topic are about the item
SARGable
Post #873171
WayneS
WayneS
Posted Thursday, February 25, 2010 10:38 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 8:49 AM
Points: 6,367,
Visits: 8,229
The "correct" answer doesn't have a column in the where clause... how can that be SARGable?
Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then
DON'T USE IT
on a production system! After all,
you
will be the one supporting it!
Links:
For better assistance in answering your questions
,
How to ask a question
,
Performance Problems
,
Common date/time routines
,
CROSS-TABS and PIVOT tables Part 1
&
Part 2
,
Using APPLY Part 1
&
Part 2
,
Splitting Delimited Strings
Post #873173
SQLRNNR
SQLRNNR
Posted Thursday, February 25, 2010 10:55 PM
SSCoach
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
WayneS (2/25/2010)
The "correct" answer doesn't have a column in the where clause... how can that be SARGable?
I would have to agree here. The lack of a column in the where clause makes none of the answers correct.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #873180
dduncan
dduncan
Posted Thursday, February 25, 2010 11:21 PM
Old Hand
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 7:54 PM
Points: 383,
Visits: 54
WayneS (2/25/2010)
The "correct" answer doesn't have a column in the where clause... how can that be SARGable?
Agreed. If the query is not RUNable then it can't be SARGable.
Post #873187
Sree Arjun Div
Sree Arjun Div
Posted Thursday, February 25, 2010 11:29 PM
SSCrazy
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 3:44 AM
Points: 2,173,
Visits: 1,350
Agreed. ..The Answers was not properly printed wrong
A condition (or predicate) in a query is said to be
sargable
if the DBMS engine can take advantage of an index to speed up the execution of the query (using index seeks, not covering indexes). The term is derived from a contraction of Search Argument.
Post #873191
Fal
Fal
Posted Thursday, February 25, 2010 11:34 PM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Wednesday, April 03, 2013 10:05 PM
Points: 584,
Visits: 1,571
Hmmm. Either assume the pseudo code has a typo and choose the "right" answer, or take the question literally and choose the "wrong" answer. A 50/50 chance. I'm gonna have to start using dice to answer the QotD.
S.
Post #873192
Krishnraj
Krishnraj
Posted Friday, February 26, 2010 12:00 AM
SSC-Addicted
Group: General Forum Members
Last Login: Wednesday, October 31, 2012 5:47 AM
Points: 457,
Visits: 234
Yeah, I agree with CirquedeSQLeil, The lack of a column in the where clause makes none of the answers correct
Post #873203
SandyDB
SandyDB
Posted Friday, February 26, 2010 12:20 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, April 13, 2011 12:21 AM
Points: 7,
Visits: 32
Non-sargable search arguments in the WHERE clause, such as "IS NULL", "<>", "!=", "!>", "!<", "NOT", "NOT EXISTS", "NOT IN", "NOT LIKE", and "LIKE '%500'" generally prevents (but not always) the query optimizer from using an index to perform a search.
How can where clause without column name can be SARGable while index can not be performed on this?
Please correct me in case I am wrong.
Post #873209
Kingston Dhasian
Kingston Dhasian
Posted Friday, February 26, 2010 12:23 AM
SSCrazy
Group: General Forum Members
Last Login: Today @ 8:59 AM
Points: 2,217,
Visits: 4,171
I noticed it only now. The first option has a column in the Where Clause. It must be a typo for sure. Anyways i got it right
Kingston Dhasian
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #873212
LythamsFinest
LythamsFinest
Posted Friday, February 26, 2010 12:40 AM
UDP Broadcaster
Group: General Forum Members
Last Login: Today @ 8:37 AM
Points: 1,497,
Visits: 811
SandyDB (2/26/2010)
Non-sargable search arguments in the WHERE clause, such as "IS NULL", "<>", "!=", "!>", "!<", "NOT", "NOT EXISTS", "NOT IN", "NOT LIKE", and "LIKE '%500'" generally prevents (but not always) the query optimizer from using an index to perform a search.
How can where clause without column name can be SARGable while index can not be performed on this?
Please correct me in case I am wrong.
The content of your reply looks remarkably like paragraph 2 of www.sql-server-performance.com/tips/t_sql_where_p2.aspx) .. so I'm not gonna argue with Brad MacGehee
Post #873221
« Prev Topic
|
Next Topic »
30 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.