Hi All,
I've recently started a new roll and inherited looking after a Solarwinds Orion instance (2023.4.2). I began investigating slow performance in our dashboard using the database performance analyser (DPA).
DPA recommended adding new indexes to our CustomPollerStatistics tables. After trying this out we went from widgets failing to load history data to loading within seconds (a massive improvement). However now our db maintenance is failing on the same table.
------------------------ Maintenance Log ---------------------------
dbm_ExecuteMaintenance: dbm_Move2Partitioned: ALTER TABLE SWITCH statement failed. There is no identical index in source table 'SolarWindsOrion.dbo.CustomPollerStatistics_CS_stg' for the index 'DPA_RECIDX_4' in target table 'SolarWindsOrion.dbo.CustomPollerStatistics_CS_Detail_hist' . ALTER TABLE CustomPollerStatistics_CS_stg
SWITCH
TO CustomPollerStatistics_CS_Detail_hist PARTITION 8
WITH (WAIT_AT_LOW_PRIORITY (MAX_DURATION = 1 MINUTES, ABORT_AFTER_WAIT = BLOCKERS))
----------------------------------------------------------------------------
The SQL that DPA recommended is as per below.
CREATE NONCLUSTERED INDEX [DPA_RECIDX_4] ON [SolarWindsOrion].[dbo].[CustomPollerStatistics_CS_Detail_hist] ([CustomPollerAssignmentID],[RowID],[Timestamp]) INCLUDE ([RawStatus])
My SQL server knowledge is a bit rough and gets me by most of the time, but this one has me stumped. Has anyone here Post with more DBA experience added their own custom indexes to speed things up?
Thanks