I have hundreds of thousands items in Sitecore, sometimes it needs to publish all of them and as the result CPU and memory are overloaded. The reason of the perfomance issue is a huge amount of items in EventQueue table.
I know there is configurable agent in Sitecore responsible for cleaning EventQueue table in database. There are also some SQL scripts to clean out the table manually. But I'm trying to find out more handy solution as it's not convenient on the production environment to run custom script or wait till the agent to do the job.
Solutions I can think of are:
- Implementing a custom handler on publish:end event
- Creating a scheduled SQL job to run the clean up script
- Limiting the size of the EventQueue table in SQL Server
- Runing cleanup agent more often (e.g. per 1/2 hour)
Update:
As I've found that Sitecore introduced <IntervalToKeep>hh:mm:ss</IntervalToKeep>
setting in Sitecore, so the best solution that I see is to:
- Set
<IntervalToKeep>01:00:00</IntervalToKeep>
- Creating a scheduled SQL job to run the clean up script (http://sdn.sitecore.net/upload/sitecore7/70/cms_tuning_guide_sc70-usletter.pdf)