Re: Q on SQL Performance tuning

From: Greg Stark <stark(at)mit(dot)edu>
To: legrand legrand <legrand_legrand(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Q on SQL Performance tuning
Date: 2019-02-14 20:29:56
Message-ID: CAM-w4HP6-gZ1vFSWNA06qNTVr+5RcJyO0PTUdwkcA5b6s2yi7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, 27 Jan 2019 at 06:29, legrand legrand
<legrand_legrand(at)hotmail(dot)com> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pryzby 2019-02-14 21:03:34 Re: JIT overhead slowdown
Previous Message Mariel Cherkassky 2019-02-14 20:07:46 Re: autovacuum big table taking hours and sometimes seconds