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:

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 , go to Setup > System and click History Report.
  2. Enter the minimum number of History records you want to show in the report, then click Next.
  3. 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 , 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:

MySQL on Hosted Server

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

 personnel can query history table size if they have access to the server command line and the appropriate server key. At the command line, run: sudo ls -la --sort=size /opt/server/Agiloft/mysql/data/sw2_std | grep hst_h | head -n 20

This query returns the top 20 largest history tables on the server, for all KBs on the server. From there, you can run additional queries to find the corresponding KB names, number of records, top offending records for a given history table, and more. Some of the tables might be recognizable by name.

You can also query the top five largest non-history tables in the database and a summary of activities. Download this script and run it on the command line on the server as follows: - python agiloft_stats.py

Related articles