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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: nikhil raj <nikhilraj474(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, NIKITA PATEL <patelnikita1411(at)gmail(dot)com>, Patel Khushbu <patelkhushbu2067(at)gmail(dot)com>
Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables.
Date: 2024-08-27 11:03:00
Message-ID: CAApHDvoQRoKHNfTaw+Sn=bZGKVmn8W-5yBPGP7+98mWJz5A9uQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, 27 Aug 2024 at 14:03, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Yeah, I got that same result by bisecting. It seems like it's
> somehow related to the cast to information_schema.sql_identifier:
> we are able to get rid of that normally but seem to fail to do so
> in this query.

In case it saves you a bit of time, I stripped as much of the
unrelated stuff out as I could and got:

create table t (a name, b int);
explain select * from (select a::varchar,b from (select distinct a,b
from t) st) t right join t t2 on t.b=t2.b where t.a='test';

getting rid of the cast or swapping to INNER JOIN rather than RIGHT
JOIN means that qual_is_pushdown_safe() gets a Var rather than a
PlaceHolderVar.

David

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dominique Devienne 2024-08-27 13:20:22 Re: Using PQsocketPoll() for PIPELINE mode
Previous Message Dominique Devienne 2024-08-27 10:23:52 Re: Using PQsocketPoll() for PIPELINE mode

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-08-27 11:16:25 Re: Parallel CREATE INDEX for GIN indexes
Previous Message Shirisha Shirisha 2024-08-27 10:50:40 Redux: Throttle WAL inserts before commit