Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Analysing a T-SQL Query Expand / Collapse
Author
Message
Posted Tuesday, May 4, 2010 10:39 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 5:52 PM
Points: 400, Visits: 910
Comments posted to this topic are about the item Analysing a T-SQL Query
Post #915796
Posted Wednesday, May 5, 2010 12:26 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 9:35 AM
Points: 3,902, Visits: 5,074
Good "back to basics" question.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #915841
Posted Wednesday, May 5, 2010 12:39 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, July 22, 2013 1:05 AM
Points: 248, Visits: 373
Good Question to analysis..

KSB
-----------------------------
Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha
Post #915846
Posted Wednesday, May 5, 2010 12:57 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 21,619, Visits: 15,275
This is a good question. Thanks. One other method one can use to demonstrate this is by evaluating the actual execution plan.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


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 #915857
Posted Wednesday, May 5, 2010 8:20 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, August 16, 2014 9:15 AM
Points: 2,818, Visits: 2,557
Really interesting question and explanation, thanks.
Post #916108
Posted Wednesday, May 5, 2010 8:53 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 1, 2014 9:46 PM
Points: 1,380, Visits: 2,684
Great question, made me work for my points.

---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
Post #916149
Posted Wednesday, May 5, 2010 9:04 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, July 10, 2014 12:49 PM
Points: 1,676, Visits: 1,754
CirquedeSQLeil (5/5/2010)
This is a good question. Thanks. One other method one can use to demonstrate this is by evaluating the actual execution plan.

Very good question, thank you. I did not try running the sample yet but I suspect that because the query is pretty simple, highlighting it in SSMS and hitting CTRL + L (to let SSMS show estimated plan) will do the trick as well because there should not be any differences between actual and estimated plans in this case.

Oleg
Post #916169
Posted Wednesday, May 5, 2010 9:17 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 5:52 PM
Points: 400, Visits: 910
Just noticed a typo in the question.

The first line of text should read "non clustered index on EmailAddress" and not "non clustered index on LastName".....this script itself is OK....
Post #916186
Posted Wednesday, May 5, 2010 9:48 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 21,619, Visits: 15,275
Oleg Netchaev (5/5/2010)
CirquedeSQLeil (5/5/2010)
This is a good question. Thanks. One other method one can use to demonstrate this is by evaluating the actual execution plan.

Very good question, thank you. I did not try running the sample yet but I suspect that because the query is pretty simple, highlighting it in SSMS and hitting CTRL + L (to let SSMS show estimated plan) will do the trick as well because there should not be any differences between actual and estimated plans in this case.

Oleg


That is likely true - haven't tried. I am just accustomed to asking for the actual execution plan that it seemed the safer route for this too.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


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 #916213
Posted Wednesday, May 5, 2010 10:10 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 9:03 PM
Points: 2,262, Visits: 5,405
Wonderful question and equally wonderful explanation. The basics is hit in the nail! Thanks for this!
Post #916247
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse