Submit a ticketCall us

AnnouncementsChange Is Inevitable

Get valuable help when it comes to tracking and monitoring changes. SolarWinds® Server Configuration Monitor (SCM) is designed to help you: detect, track, and receive alerts when changes occur, correlate system performance against configuration changes, compare server and application configuration against custom baselines, and verify application and system changes.

Learn more.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Truncate large SAM HardwareItem tables

Truncate large SAM HardwareItem tables

Table of contents
Created by Malik Haider, last modified by Harry Griffiths on Oct 01, 2018

Views: 1,659 Votes: 0 Revisions: 14

Updated October 1st, 2018


This article describes how to truncate APM_HardwareItem tables holding large historical data for SAM, which contain device hardware statuses. Truncating these tables will involve re-polling the current status of the hardware and re-populating the table.


The original name of SolarWinds SAM was APM so you may still see references to "APM" in SAM log files and database elements.


Truncating tables can reduce the database size significantly and help the application and database perform faster including loading data on the website.


Please be aware this will delete all the related historical data. Only perform these steps if you do not wish to store this data.


You should also review the Quick Orion database health check guide to check your current database health and settings. 


table_name rows size_in_kb
APM_HardwareItem_Detail 1381684300 11860320
APM_HardwareItem_Hourly 69985120 4248400
APM_HardwareItem_Daily 34829770 2279760




SAM 6.2 and later


  1. Create a backup of your Orion database. Refer to Backing Up, Restoring, and Migrating Your Orion Database.
  2. Run the following SQL query through Database Manager. Refer to Run an SQL query in Orion Database Manager on Windows Server 2008.

Truncate table  APM_HardwareItem_Detail
Truncate table  APM_HardwareItem_HourlyData
Truncate table  APM_HardwareItem_Hourly
Truncate table  APM_HardwareItem_DailyData
Truncate table  APM_HardwareItem_Daily

  1. Click Execute Query.
  2. Shrink the Orion Database  to reclaim the unused free space.




Last modified