Submit a ticketCall us

AnnouncementsWeb Help Desk Integrations eCourse

Looking to reduce response times? Sign up for our eCourse to learn how integrating Web Help Desk with Dameware Remote Support, Network Configuration Manager, Network Performance Monitor, and Server & Application Monitor can improve communication efficiencies.

Register here.

Home > Success Center > Server & Application Monitor (SAM) > Truncate large APM HardwareItem tables

Truncate large APM HardwareItem tables

Table of contents
Created by Malik Haider, last modified by Malik Haider on Apr 04, 2018

Views: 1,381 Votes: 0 Revisions: 8

Updated July 22, 2016


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


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


Note: This article is part of the Quick Orion database health check guide. SolarWinds strongly recommends to go through the full guide and 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.0 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.
  3. 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
  4. Click Execute Query.
  5. Shrink the Orion Database  to reclaim the unused free space.




Last modified