The history table and the history engine

Abstract

Guide to how the Sitecore history engine saves information about changes made to items in the history table.

The history engine saves information about changes made to items in the History table. All Sitecore content databases contain this table. The engine logs the item change data based on Sitecore events. It subscribes to events when it is initialized it and registers its own handlers that track item history.

Note

Sitecore does not use the history table by default. It has been disabled for performance reasons. If you need to use it, you must enable it like this:

  • Remove the example extension from the \App_Config\Include\Examples\Sitecore.HistoryEngine.config.example file.

Keep in mind that there is a performance penalty when you enable it. Some of the information is available in the EventQueue table, but it is retained for a much shorter time. Some information is available in the log files as AUDIT messages. Finally you can customize Sitecore to collect more information, for example by using custom event handlers for item change events.

By default, the engine tracks these item operations (events):

  • New version added to the item (AddedVersion)

  • Item copied to another location (CopiedItem)

  • New item created (CreatedItem)

  • Item deleted (DeletedItem)

  • Item moved (MovedItem)

  • Item saved (SavedItem)

  • Item version removed (RemovedVersion)

Note

If an item operation takes place in the EventDisabler context, the operation will not be recorded.