Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

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


Group: General Forum Members
Last Login: Friday, November 18, 2016 9:50 AM
Points: 1,525, Visits: 3,573
durayakar (4/12/2013)
LEFT JOIN TBFe FEP -- 112357833
ON FEP.Fcde = V.Fcde
LEFT JOIN tbUsers RFCU --22089
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



Group: General Forum Members
Last Login: Yesterday @ 5:18 AM
Points: 45,619, Visits: 44,147
curious_sqldba (4/10/2013)
25000 inner loops is the issue.


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, MVP, M.Sc (Comp Sci)
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