Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, nikhil raj <nikhilraj474(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.
Date: 2024-08-28 03:52:46
Message-ID: CAMbWs49PDEbkb7_f=URpon+1tjUbi4Ewwhbf=6N=3XUURLZjWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Aug 28, 2024 at 11:30 AM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> On Wed, Aug 28, 2024 at 5:52 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > I realized that actually we do have the mechanism for making that
> > work: we could apply add_nulling_relids to the expression, if it
> > meets those same conditions.
>
> I think this should work, as long as we apply add_nulling_relids only
> to Vars/PHVs that belong to the subquery in this case, because only
> those Vars/PHVs would be nulled by the outer joins contained in the
> nullingrels.

To be more concrete, I know theoretically it is the whole expression
that is nullable by the outer joins, not its individual vars. But in
this case if the contained vars (that belong to the subquery) become
NULL, the whole expression would be NULL too, because it does not
contain any non-strict constructs. That's why I think this approach
should work.

Thanks
Richard

In response to

Browse pgsql-general by date

  From Date Subject
Next Message KK CHN 2024-08-28 05:39:51 Pgbackrest specifying the default DB necessary/correct way ?
Previous Message Richard Guo 2024-08-28 03:30:45 Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tender Wang 2024-08-28 03:57:12 Re: Eager aggregation, take 3
Previous Message Bertrand Drouvot 2024-08-28 03:43:43 Re: Flush pgstats file during checkpoints