Skip to end of metadata
Go to start of metadata

Checking History Database Size

History entries can contribute to slow KB performance, so if you're troubleshooting performance issues, consider checking the history size. If you find the size is a contributing factor, you can use Delete Actions to delete history entries as needed.

To prevent excessive history entry buildup in the future, consider:

  • Configuring time-based rules to clean up after themselves, by having the rule run an additional Delete action to delete its old history entries
  • Changing rules to not create history entries, or to create them only when a change is made, by changing the setting on the General tab of the Rules wizard
  • Editing the table's History field to track fewer fields, by editing the History field and selecting fewer fields on the Options tab

For more information about managing history entries, see History Fields and Rules.

History Report

To easily see the history size for a KB:

  1. In  Agiloft, go to Setup > System and click History Report.
  2. The report shows the total size of History data in each table, and the individual records with the most History entries.
    Example History Report

MS SQL Server

For an MS SQL server, follow these steps to check the history size for a table:

  1. In Agiloft, go to [Setup Table] for the table in question and note the Table Name. The Table Name is above the Logical Table Name on the General tab.
    Table Name field
  2. Run a query from SQL Server Management Studio (SSMS), replacing table_name with the value for your table:  select h.dbname from swtable h, swtable t where t.dbname='table_name' and t.historytableid=h.swtableid
  3. This returns the name of the history table corresponding to the table you chose. Using this information, you can find:
    • The number of history records, replacing history_table with the name of your history table:  select count(*) from history_table
    • The size of the history table in bytes, replacing history_table with the name of your history table:  sp_spaceused history_table

MySQL on Hosted Server

If your KB is hosted by  Agiloft , reach out to Support or your Implementation specialist to have them query history table size on the server.