Amazon Redshift announces query monitoring rules (QMR), a new feature that automates workload management, and a new function to calculate percentiles

Posted on: Apr 21, 2017

You can use the new Amazon Redshift query monitoring rules feature to set metrics-based performance boundaries for workload management (WLM) queues, and specify what action to take when a query goes beyond those boundaries. For example, for a queue that’s dedicated to short running queries, you might create a rule that aborts queries that run for more than 60 seconds. To track poorly designed queries, you might have another rule that logs queries that contain nested loops. We also provide pre-defined rule templates in the Amazon Redshift management console to get you started.

Along with query monitoring rules, we are releasing two new system tables that give you query metrics; STV_QUERY_METRICS displays the metrics for currently running queries and STL_QUERY_METRICS records the metrics for completed queries. 

The new APPROXIMATE PERCENTILE_DISC function returns the value in a list that's closest to a given percentile. Approximation enables the function to execute much faster, with a relative error of around 0.5 percent.