Re: Finding execution plan - Mailing list pgsql-general

From shashidhar Reddy
Subject Re: Finding execution plan
Date
Msg-id CAH=zU4sMSs0KDiFC2DrmRxhWn8qS0zP4xbbR12JwY=unocAF2g@mail.gmail.com
Whole thread Raw
In response to Re: Finding execution plan  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general
Hello Bruce,

I do not see parameters starting with auto_explain. in configuration file and also do I need to enable logging collector. Please guide me on this.

On Fri, 3 Nov, 2023, 11:24 pm Bruce Momjian, <bruce@momjian.us> wrote:
On Fri, Nov  3, 2023 at 10:44:12AM -0700, Adrian Klaver wrote:
>
> On 11/3/23 10:40 AM, shashidhar Reddy wrote:
>
>     Hello All,
>
>     I have a Postgresql function scheduled to run on the database, some tines
>     it is taking too long than usual time, is it possible to get the execution
>     plan of this function or any other way to troubleshoot
>
>
> You might to take a look at the contrib module:
>
>
> https://www.postgresql.org/docs/current/pgstatstatements.html
>
>
> "The pg_stat_statements module provides a means for tracking planning and
> execution statistics of all SQL statements executed by a server."

Since he asked about execution plans, I was thinking auto_explain:

        https://www.postgresql.org/docs/current/auto-explain.html

--
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.

pgsql-general by date:

Previous
From: ledieudesmammouths@free.fr
Date:
Subject: Logical replication (pgoutput plugin) in streaming mode: peek() always starts from beginning of transaction, not from latest stream block
Next
From: Adrian Klaver
Date:
Subject: Re: No longer available installer for greater version then PostgreSQL 10