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: Wednesday, December 17, 2014 9:01 PM
Points: 412, Visits: 962
Comments posted to this topic are about the item Analysing a T-SQL Query
Post #915796
Posted Wednesday, May 5, 2010 12:26 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:08 AM
Points: 4,160, Visits: 5,557
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


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 8:02 AM
Points: 18,064, Visits: 16,100
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, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #915857
Posted Wednesday, May 5, 2010 8:20 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, December 12, 2014 8:24 AM
Points: 2,818, Visits: 2,567
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: Tuesday, December 2, 2014 11:00 AM
Points: 1,142, Visits: 2,693
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: Today @ 9:13 AM
Points: 1,676, Visits: 1,761
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: Wednesday, December 17, 2014 9:01 PM
Points: 412, Visits: 962
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


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 8:02 AM
Points: 18,064, Visits: 16,100
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, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #916213
Posted Wednesday, May 5, 2010 10:10 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, December 11, 2014 5:03 PM
Points: 2,262, Visits: 5,427
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