|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:08 AM
Points: 7,074,
Visits: 7,110
|
|
Hugo Kornelis (1/1/2012)
Jeff Moden (1/1/2012)
Tom Brown (12/31/2011) My word Jeff! A lot of thinking for a single point, considering I got 7 points for counting Santa's reindeer. Keep 'em coming. I need the mental exercise.I may have missed it but I didn't see a place on the QOTD entry form to assign a point value. If I did, I'd likely have given it 3 points even with the copyable code.  You didn't miss anything, Jeff. Steve decides the amount of points to assign to each question. And he always assigns ridiculously high amounts of points to the seasonal "humor" questions. Yes, he's done that again today (for a seasonal simple arithmetic question).
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:12 AM
Points: 1,631,
Visits: 2,028
|
|
Jeff Moden (12/28/2011)
To be sure, I made a terrible mistake. ISNULL isn't SARGable.
That is just a perspective thing.
Your 'terrible mistake' challenged something I believed to be true and highlighted a lots of things I didn't know. Three days into the new year and I now have a much better understanding of how indexes are used. I think it is going to be a good year.
Many thanks to yourself, Hugo and Paul
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 6:33 PM
Points: 32,889,
Visits: 26,757
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 6:33 PM
Points: 32,889,
Visits: 26,757
|
|
440692 I am just a number (1/3/2012)
Jeff Moden (12/28/2011)
To be sure, I made a terrible mistake. ISNULL isn't SARGable.That is just a perspective thing. Your 'terrible mistake' challenged something I believed to be true and highlighted a lots of things I didn't know. Three days into the new year and I now have a much better understanding of how indexes are used. I think it is going to be a good year. Many thanks to yourself, Hugo and Paul
Thank you for the kind words. And, I agree... once again, the discussions are what really paid off on these fine forums.
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 5:01 PM
Points: 4,540,
Visits: 8,184
|
|
Explanation: Nothing is stopping an INDEX SEEK from being used and answer "A" is the correct answer. Actually something does.
It's named "bookmark lookup".
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 10:33 AM
Points: 10,989,
Visits: 10,529
|
|
Sergiy (1/12/2012)
Explanation: Nothing is stopping an INDEX SEEK from being used and answer "A" is the correct answer. Actually something does. It's named "bookmark lookup". There is no 'bookmark lookup' in this case as Jeff's explanation of point H reveals: the non-clustered index is covering for the query.
'Bookmark lookup' is out-of-date now: they are referred to as an RID Lookup for a heap, or Key Lookup for a clustered index. The lookup operation is a seek on the clustered index key, or direct navigation to a row locator (RID) if the base table is a heap.
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 5:01 PM
Points: 4,540,
Visits: 8,184
|
|
SQL Kiwi (1/12/2012)
There is no 'bookmark lookup' in this case as Jeff's explanation of point H reveals: the non-clustered index is covering for the query.
Sounds right. I need to find out what did I do wrong to make it do scan instead of seek in my test case.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 6:54 AM
Points: 9,364,
Visits: 6,462
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 11:44 AM
Points: 1,603,
Visits: 1,179
|
|
Thanks for the question. Even though I got it wrong, I learned a lot.
_________________________________ seth delconte http://sqlkeys.com
|
|
|
|