On Sun, 27 Jan 2019 at 06:29, legrand legrand <legrand_legrand@xxxxxxxxxxx> wrote: > > Hi, > > There are many tools: > - (core) extension pg_stat_statements will give you informations of SQL > executions, I've had enormous success using pg_stat_statements and gathering the data over time in Prometheus. That let me build a dashboard in Grafana that can dive into specific queries and see when their executions rate suddenly spiked or the resource usage for the query suddenly changed. > - extension pg_stat_sql_plans (alpha) gives all of pg_stat_statements and much more Extending pg_stat_statements to track statistics per-plan would be a huge advance. And being able to link the metrics with data dumped in the log from things like log_min_duration and pg_auto_explain would make them both more useful. -- greg