Not sure if this is the forum to post this, but it seems to be the best fit.
We recently upgraded Solarwinds to 10.5.0.79. One of the Solarwinds stored procedures [dbm_TrapMessages_DeleteStale] is performing abysmally, taking up 100% CPU time on our SQL Server.
Anyone else noticed this?
One of the culprits is this command:
SELECT TOP 10000 TrapID FROM Traps WHERE DateTime < @date
As there is no index on the [DateTime] column, SQL Server scans through the table instead (actually a clustered index scan, which amounts to the same thing). I believe adding a nonclustered index on the [DateTime] column in the [Traps] table will improve performance greatly. I'll be trying it myself within the next week or so.
There is another command in that stored procedure that doesn't make much sense:
SELECT TrapVarBinds.TrapID
FROM TrapVarBinds
LEFT JOIN Traps ON TrapVarBinds.TrapID=Traps.TrapID
WHERE Traps.TrapID IS NULL
The WHERE predicate will never be true as the [TrapID] column in both the [Traps] and [TrapVarBinds] tables are explicitly defined to not allow nulls. Again, this is causing extra table scanning. The WHERE clause should be removed from this statement.
Our [Traps] table has almost 3 million rows. Our TrapVarBinds table has over 42 million rows.
Hopefully this will be addressed in a future release.....
Scott