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 ««12

Query - Nested Loop Join Expand / Collapse
Author
Message
Posted Friday, April 12, 2013 8:27 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 9:31 AM
Points: 1,294, Visits: 2,991
durayakar (4/12/2013)
LEFT JOIN TBFe FEP -- 112357833
ON FEP.Fcde = V.Fcde
AND fep.RID = V.RID
LEFT JOIN tbUsers RFCU --22089
ON RFCU.UserID = fep.RFCUID
LEFT JOIN tbUsers RLCU --22089
ON RLCU.UserID = FEP.ResidualLastWorkedByUserID


I think there is some room for improvement in the above section.


Can you please tell me what you "think"
Post #1441736
Posted Friday, April 12, 2013 8:51 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 2:01 PM
Points: 40,390, Visits: 36,823
curious_sqldba (4/10/2013)
25000 inner loops is the issue.


Why?

I could easily force it to use hash and make it perform better.


Have you tested that and seen that forcing a hash join improves performance in all cases?

I think the order in which the joins are done is bad. I am looking for some assistance in changing the order.


Order of joins won't affect the type of join chosen, unless you go forcing join types that is. Are your stats correct and your row estimates accuate?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1441751
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse