From: Adrian Klaver <adrian.klaver@aklaver.com>
To: shashidhar Reddy <shashidharreddy001@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Finding execution plan
Date: Fri, 3 Nov 2023 10:44:12 -0700
Message-ID: <42ac2198-ecb3-4a7e-a40d-d5f231c99e10@aklaver.com> (raw)
In-Reply-To: <CAH=zU4vaNYtF+KQ_9PJVxHDDM+73TPY-uLT6Kn6DyR8M6YsB0w@mail.gmail.com>
References: <CAH=zU4vaNYtF+KQ_9PJVxHDDM+73TPY-uLT6Kn6DyR8M6YsB0w@mail.gmail.com>
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."
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: adrian.klaver@aklaver.com, shashidharreddy001@gmail.com
Subject: Re: Finding execution plan
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>
* 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