From: Bruce Momjian <bruce@momjian.us>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Clive Swan <cliveswan@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Long running queries
Date: Wed, 25 Jan 2023 19:13:49 -0500
Message-ID: <Y9HFvR145+1+MeOm@momjian.us> (raw)
In-Reply-To: <8299AF9E-0269-4F02-BC0D-D86D0D817D86@elevated-dev.com>
References: <CWXP123MB395950C601C6F6D02AFA913EA0CE9@CWXP123MB3959.GBRP123.PROD.OUTLOOK.COM>
<8299AF9E-0269-4F02-BC0D-D86D0D817D86@elevated-dev.com>
On Wed, Jan 25, 2023 at 10:57:58AM -0700, Scott Ribe wrote:
> > On Jan 25, 2023, at 10:55 AM, Clive Swan <cliveswan@gmail.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@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Embrace your flaws. They make you human, rather than perfect,
which you will never be.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: bruce@momjian.us, scott_ribe@elevated-dev.com, cliveswan@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Long running queries
In-Reply-To: <Y9HFvR145+1+MeOm@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox