Submit a ticketCall us

Training ClassThe Orion® Platform Instructor-led Classes

Provided by SolarWinds® Academy, these trainings will introduce users to the Orion Platform and its features, management, and navigation. These courses are suitable for users looking to discover new tips, tricks, and ways to adapt their Orion products to better suit their monitoring needs:
Deploying the Orion Platform
Configuring Orion views, maps, and accounts
Configuring Orion alerts and reports

Reserve your seat.

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,826 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