pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: shashidhar Reddy <shashidharreddy001@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Finding execution plan
Date: Fri, 3 Nov 2023 13:54:36 -0400
Message-ID: <ZUUz3D7luiCxeqij@momjian.us> (raw)
In-Reply-To: <42ac2198-ecb3-4a7e-a40d-d5f231c99e10@aklaver.com>
References: <CAH=zU4vaNYtF+KQ_9PJVxHDDM+73TPY-uLT6Kn6DyR8M6YsB0w@mail.gmail.com>
	<42ac2198-ecb3-4a7e-a40d-d5f231c99e10@aklaver.com>

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.





view thread (7+ messages)  latest in thread

Message-ID: <ZUUz3D7luiCxeqij@momjian.us>
Permalink:  ../ZUUz3D7luiCxeqij@momjian.us/
Also on:    postgresql.org/message-id/ZUUz3D7luiCxeqij@momjian.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bruce@momjian.us, adrian.klaver@aklaver.com, shashidharreddy001@gmail.com
  Subject: Re: Finding execution plan
  In-Reply-To: <ZUUz3D7luiCxeqij@momjian.us>
  References: <CAH=zU4vaNYtF+KQ_9PJVxHDDM+73TPY-uLT6Kn6DyR8M6YsB0w@mail.gmail.com> <42ac2198-ecb3-4a7e-a40d-d5f231c99e10@aklaver.com> <ZUUz3D7luiCxeqij@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