In the Sitecore DisplayStates(IWorkflow workflow, XmlControl placeholder) window (Sitecore.Shell.Applications.Workbox) in the DisplayStates(IWorkflow workflow, XmlControl placeholder) method DisplayStates(IWorkflow workflow, XmlControl placeholder) Sitecore uses the following method to retrieve items in a specific working state.
DataUri[] items = this.GetItems(state, workflow);
About 650,000 items are requested in our core database. It takes 1½ minutes to download Workbox. I looked at what happens inside the this.GetItems (state, workflow) method using dotpeek.
Internally, he builds the following query, which took 1 ½ minutes to run in the main database (select 36 items from 650,000 items),
SELECT * FROM VersionedFields INNER JOIN Items ON VersionedFields.ItemId = Items.Id WHERE ItemId IN (SELECT ItemId FROM SharedFields WHERE FieldId=Workflowengine field AND Value= workflowengine) AND FieldId=workflow state AND Value= workflowstate value ORDER BY Name, Language, Version
Is there a way to improve productivity in Workbox?
sitecore sitecore6 sitecore-workflow
Dhanuka777
source share