Re: Finding execution plan

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: shashidhar Reddy <shashidharreddy001(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Finding execution plan
Date: 2023-11-03 17:56:22
Message-ID: 5e5bc083-0bf6-41f0-baad-0636a02b5ab9@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 11/3/23 10:54 AM, Bruce Momjian 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

Yeah, that would be the better option.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Garfield Lewis 2023-11-03 18:23:16 Re: [EXT] Re: How to tell which statement is being executed
Previous Message shashidhar Reddy 2023-11-03 17:56:19 Re: Finding execution plan