July 21, 2013 at 5:48 am
I was joining nearly 5 inner joins and 2 left outer join Final with group by
Here i am facing perfomance issue..Please help me!!!!!
select ....
FROM dbo.FactFDDCellQHourlyCalcsEricsson FDDCALC WITH(NOLOCK)
INNER JOIN dbo.FactFDDCellQHourlyPegEricsson1 FDDPEG WITH(NOLOCK)
ON FDDCALC.DimDateID = FDDPEG.DimDateID
AND FDDCALC.DimQHourID = FDDPEG.DimQHourID
AND FDDCALC.DimFDDCellID = FDDPEG.DimFDDCellID
INNER JOIN dbo.FactFDDCellQHourlyPegEricsson2 FDDPEG2 WITH(NOLOCK)
ON FDDCALC.DimDateID = FDDPEG2.DimDateID
AND FDDCALC.DimQHourID = FDDPEG2.DimQHourID
AND FDDCALC.DimFDDCellID = FDDPEG2.DimFDDCellID
INNER JOIN DimQHour DQ
ON FDDCALC.DimQHourID = DQ.DimQHourKey
LEFT OUTER JOIN #FactFreqCellRelationQHourlyCalcsEricsson CALC
ON FDDCALC.DimDateID = CALC.DimDateID
AND FDDCALC.DimQHourID = CALC.DimQHourID
AND FDDCALC.OSSC_RC = CALC.OSSC_RC
AND FDDCALC.MeContext = CALC.MeContext
AND FDDCALC.EUtranCellFDD = CALC.EUtranCellFDD
LEFT OUTER JOIN dbo.View_DimFDDCell_Mkt99 D99 WITH (NOLOCK)
ON FDDCALC.DimFDDCellID = D99.DimFDDCellID
INNER JOIN #TEMP_RANK SPL
ON FDDCALC.DimDateID=SPL.DimDateID
AND FDDCALC.DimQHourID = SPL.DimQHourID
AND FDDCALC.DimFDDCellID = SPL.DimFDDCellID
INNER JOIN @Temp_RFASFDDCell_HOURLY Temp
ON FDDCALC.OSSC_RC = Temp.OSSC_RC
AND FDDCALC.MeContext = Temp.eNodeB
WHERE FDDCALC.DimDateID = @DimDateID and DQ.[HOUR]= @DimHourID
GROUP BYFDDCALC.DimFDDCellID
July 21, 2013 at 7:30 am
Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
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
July 21, 2013 at 11:22 am
To add to what Gail said, you have at least one view involved in this and you need to include the code and the table/index information for that along with the other things recommended in Gail's article.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 21, 2013 at 3:32 pm
Oh, and ditch the nolock
See - http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx
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
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply