Re: Long running queries

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: Clive Swan <cliveswan(at)gmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Long running queries
Date: 2023-01-26 00:13:49
Message-ID: Y9HFvR145+1+MeOm@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Jan 25, 2023 at 10:57:58AM -0700, Scott Ribe wrote:
> > On Jan 25, 2023, at 10:55 AM, Clive Swan <cliveswan(at)gmail(dot)com> wrote:
> >
> > SQL Server has a handy SQL "tool" to spot expensive and/or long running queries.
> >
> > Is there a similar query/tool for Postgresql??
>
> - pg_stat_statements extension
> - log_min_duration config parameter

FYI, log_min_duration_statement will not print the duration until the
query completes, so it is good for analysis later.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Embrace your flaws. They make you human, rather than perfect,
which you will never be.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Benjamin Leis 2023-01-26 00:18:01 Re: Long running queries
Previous Message Jerry Sievers 2023-01-25 23:28:00 Re: Does raising maintenance_work_mem get seen by an already running aucovac?