public inbox for [email protected]
help / color / mirror / Atom feedFrom: nikhil raj <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Cc: NIKITA PATEL <[email protected]>
Cc: Patel Khushbu <[email protected]>
Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.
Date: Tue, 27 Aug 2024 04:11:36 +0530
Message-ID: <CAG1ps1zFv7gHc1-7dxXfFeNvoaENW5WDJ_DrJsZNJk72HvEABw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CALNXOfqDr5jVRZHThyXyNftDuezjxOJB1mqw=4x1T8YBibi6uw@mail.gmail.com>
<CAG1ps1w61XD1LxUf3EBCZ=VR3S_orRj_dk6cxmO5KusBVyrgMg@mail.gmail.com>
<CAAvG1pChk3W9MWkK-_JPyUdThSoJhv4MueH5i8cZS2T_HUP5dA@mail.gmail.com>
<CAG1ps1xvnTZceKK24OUfMKLPvDP2vjT-d+F2AOCWbw_v3KeEgg@mail.gmail.com>
<[email protected]>
Hi Adrian,
Thanks for the quick response.
I've already performed a vacuum, reindex, and analyze on the entire
database, but the issue persists. As you can see from the execution plan,
the time difference in PostgreSQL 16 is still significantly higher, even
after all maintenance activities have been completed.
It seems there might be a bug in PostgreSQL 16 where the performance of
queries on *information_schema* tables is degraded. As both the tables are
postgres system tables
https://explain.depesz.com/s/bdO6b :-PG13
<https://explain.depesz.com/s/bdO6b;
https://explain.depesz.com/s/bpAU :- PG16
<https://explain.depesz.com/s/bpAU;
On Tue 27 Aug, 2024, 3:40 AM Adrian Klaver, <[email protected]>
wrote:
> On 8/26/24 14:49, nikhil raj wrote:
> > Hi All,
> >
> > I've encountered a noticeable difference in execution time and query
> > execution plan row counts between PostgreSQL 13 and PostgreSQL 16 when
> > running a query on |information_schema| tables. Surprisingly, PostgreSQL
> > 16 is performing slower than PostgreSQL 13.
>
> Did you run ANALYZE on the Postgres 16 instance?
>
> > *4PostgreSQL 13.14 (PostgreSQL 13.14 on x86_64-pc-linux-gnu, compiled by
> > gcc 11.4.0, 64-bit)*
> > Execution plan: PG13.14 Execution Plan
> > <https://explain.dalibo.com/plan/ag1a62a9d47dg29d;
> >
> > *PostgreSQL 16.4 (PostgreSQL 16.4 on x86_64-pc-linux-gnu, compiled by
> > gcc 11.4.0, 64-bit)*
> > Execution plan: PG16.4 Execution Plan
> > <https://explain.dalibo.com/plan/4c66fdfbf2hf9ed2;
>
>
> Use:
>
> https://explain.depesz.com/
>
> It is easier to follow it's output.
>
> >
> >
> > Has anyone else experienced similar behavior or could provide insights
> > into why PostgreSQL 16 might be slower for this query? Any advice or
> > suggestions for optimization would be greatly appreciated.
>
> Yes when ANALYZE was not run on a new instance.
>
> >
> > Thank you!
> >
> > NOTE:- PFA the raw file of explain and analyze below.
> >
> >
> >
> >
>
> --
> Adrian Klaver
> [email protected]
>
>
view thread (22+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.
In-Reply-To: <CAG1ps1zFv7gHc1-7dxXfFeNvoaENW5WDJ_DrJsZNJk72HvEABw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox