Re: improve EXPLAIN for wide tables

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2024-12-30T17:51:06Z
Lists: pgsql-hackers
> I wrote:
> > Sami Imseih <samimseih@gmail.com> writes:
> >> I am attaching a patch that deals with the RTE_JOIN case.
>
> > I'll take a look.  Thanks for the test demonstrating that
> > this makes a visible performance difference.
>
> Pushed with some simplification: we don't need a new flag,
> because none of the callers of set_simple_column_names need it
> to do anything with join RTEs.  This is better anyway because
> set_relation_column_names' comment explicitly says it is not
> for join RTEs, and now we don't use it on them ever.
>

Thank you for pushing the enhancement!

Regards,

Sami Imseih
Amazon Web Services (AWS)



Commits

  1. Skip useless calculation of join RTE column names during EXPLAIN.

  2. Use a hash table to de-duplicate column names in ruleutils.c.