Memory Performance using SQL Query

Memory Performance using SQL Query

Sometimes you need to use the SQL queries to get the performance data instead of using WUG Reports. You can use the following queries to get the required data for Memory utilization.

SELECT Device.nDeviceID, Device.sDisplayName, sType, nSize, nUsed_Avg, nUsed_Min, nUsed_Max, dPollTime 
FROM dbo.StatisticalMemory
LEFT OUTER JOIN dbo.StatisticalMemoryIdentification ON 
StatisticalMemoryIdentification.nStatisticalMemoryIdentificationID = StatisticalMemory.nStatisticalMemoryIdentificationID
LEFT OUTER JOIN dbo.PivotStatisticalMonitorTypeToDevice ON 
PivotStatisticalMonitorTypeToDevice.nPivotStatisticalMonitorTypeToDeviceID = StatisticalMemoryIdentification.nPivotStatisticalMonitorTypeToDeviceID
LEFT OUTER JOIN Device ON 
Device.nDeviceID = PivotStatisticalMonitorTypeToDevice.nDeviceID
ORDER BY dPollTime DESC

Memory Cache data, the latest Memory utilization data (i.e exactly one record per monitored Memory)

SELECT Device.nDeviceID, Device.sDisplayName, sType, nSize, nUsed_Avg, nUsed_Min, nUsed_Max, dPollTime 
FROM dbo.StatisticalMemoryCache
LEFT OUTER JOIN dbo.StatisticalMemoryIdentification ON 
StatisticalMemoryIdentification.nStatisticalMemoryIdentificationID = StatisticalMemoryCache.nStatisticalMemoryIdentificationID
LEFT OUTER JOIN dbo.PivotStatisticalMonitorTypeToDevice ON 
PivotStatisticalMonitorTypeToDevice.nPivotStatisticalMonitorTypeToDeviceID = StatisticalMemoryIdentification.nPivotStatisticalMonitorTypeToDeviceID
LEFT OUTER JOIN Device ON 
Device.nDeviceID = PivotStatisticalMonitorTypeToDevice.nDeviceID
ORDER BY dPollTime DESC