Description
Issue with downtime and slow startup after deployment with performance issues triggering auto scaling in DXC environment.
Long running query below identified.
(@PropertyDefinitionID int)SELECT TOP 1
tblWorkContent.fkContentID as ContentID,
tblWorkContent.pkID AS WorkID
FROM
tblWorkContentProperty
INNER JOIN
dbo.GetExistingScopesForDefinition(@PropertyDefinitionID) as ExistingScopes ON tblWorkContentProperty.ScopeName = ExistingScopes.ScopeName
INNER JOIN
tblWorkContent ON tblWorkContentProperty.fkWorkContentID=tblWorkContent.pkID
This is related to a bug, http://world.episerver.com/support/Bug-list/bug/CMS-4915
The problem was that GetExistingScopesForDefinition could return a large number of duplicate rows so to fix this in versions before the 10.2.0, modify GetExistingScopesForDefinition by adding a DISTINCT to the code
INSERT INTO @ScopedPropertiesTable
SELECT Property.ScopeName FROM
So that it becomes
INSERT INTO @ScopedPropertiesTable
SELECT DISTINCT Property.ScopeName FROM
This should make the query go significantly faster
Comments
0 comments
Please sign in to leave a comment.