Re: Debugging query performance in postgres - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Debugging query performance in postgres
Date
Msg-id 4794e640-e4a4-4730-985a-57be297122e0@aklaver.com
Whole thread Raw
In response to Debugging query performance in postgres  (veem v <veema0000@gmail.com>)
Responses Re: Debugging query performance in postgres
List pgsql-general
On 9/4/25 09:57, veem v wrote:
> Hello,
> We have a situation in which we had a dml query within a procedure that 
> was running fine but suddenly the plan flipped and it started running 
> longer. It took us a good amount of time to identify the cause and fix 
> it. So I have below questions,

What was the cause?

Postgres version

Was there any major changes in the database e.g schema changes or 
quantity of data?

Is autovacuum running?

> 1)Do we have any data dictionary view or query available which gives us 
> information on what were the queryids those are executing from within a 
> procedure and how much time they are taking?
> 2)Also how to identify , if any specific queries has opted a different 
> plan today as compared to past executions and also response time 
> increased because of that?

Take a look at:

https://www.postgresql.org/docs/current/pgstatstatements.html

> 
> Regards
> Veem


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Achilleas Mantzios
Date:
Subject: Re: In-order pg_dump (or in-order COPY TO)
Next
From: Adrian Klaver
Date:
Subject: Re: Q: limit the length of log file entries?