pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedFinding execution plan
7+ messages / 3 participants
[nested] [flat]
* Finding execution plan
@ 2023-11-03 17:40 shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: shashidhar Reddy @ 2023-11-03 17:40 UTC (permalink / raw)
To: pgsql-general
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Finding execution plan
@ 2023-11-03 17:44 Adrian Klaver <adrian.klaver@aklaver.com>
parent: shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Adrian Klaver @ 2023-11-03 17:44 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; pgsql-general
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."
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Finding execution plan
@ 2023-11-03 17:45 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 1 reply; 7+ messages in thread
From: Adrian Klaver @ 2023-11-03 17:45 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; pgsql-general
On 11/3/23 10:44 AM, 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:
>
^want
>
>
> 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."
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Finding execution plan
@ 2023-11-03 17:54 Bruce Momjian <bruce@momjian.us>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 2 replies; 7+ messages in thread
From: Bruce Momjian @ 2023-11-03 17:54 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: shashidhar Reddy <shashidharreddy001@gmail.com>; pgsql-general
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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Finding execution plan
@ 2023-11-03 17:56 shashidhar Reddy <shashidharreddy001@gmail.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 7+ messages in thread
From: shashidhar Reddy @ 2023-11-03 17:56 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
Thank you Adrian fir the reply, I am looking for something like complete
execution plan of the function just like EXPLAIN does.
On Fri, 3 Nov, 2023, 11:15 pm Adrian Klaver, <adrian.klaver@aklaver.com>
wrote:
>
> On 11/3/23 10:44 AM, 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:
>
> ^want
>
>
> 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."
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Finding execution plan
@ 2023-11-03 17:56 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 7+ messages in thread
From: Adrian Klaver @ 2023-11-03 17:56 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: shashidhar Reddy <shashidharreddy001@gmail.com>; 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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Finding execution plan
@ 2023-11-08 19:06 shashidhar Reddy <shashidharreddy001@gmail.com>
parent: Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 7+ messages in thread
From: shashidhar Reddy @ 2023-11-08 19:06 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; 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.
>
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2023-11-08 19:06 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 17:40 Finding execution plan shashidhar Reddy <shashidharreddy001@gmail.com>
2023-11-03 17:44 ` Adrian Klaver <adrian.klaver@aklaver.com>
2023-11-03 17:45 ` Adrian Klaver <adrian.klaver@aklaver.com>
2023-11-03 17:56 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2023-11-03 17:54 ` Bruce Momjian <bruce@momjian.us>
2023-11-03 17:56 ` Adrian Klaver <adrian.klaver@aklaver.com>
2023-11-08 19:06 ` shashidhar Reddy <shashidharreddy001@gmail.com>
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