When loading the Metric Viewer in Operator Console with many data points, there are performance issues. The graphs load very slowly, or not at all.
Queries in the stored procedure used to prepare the data points in the graphs need to be optimized.
NOTE: The Metric Viewer is not expected be able to load if there are more than 1 million data points in the view. The number of data points in the view can be determined by taking into account the number of devices, metrics, collection interval, and time frame.
The stored procedure used to create the metric viewer data has had the legacy row-by-row processing updated with high-performance set-based operations (Recursive CTEs and Window Functions) to significantly reduce execution time on large datasets.
Also, new granular logging has been integrated into the procedure. This allows us to track the duration of each internal logic block (interpolation, aggregation, etc.) in real-time.
To update the stored procedure, do the following:
SQL
SELECT * FROM tbnlogging ORDER BY starttime DESC;