pgsql: Skip useless calculation of join RTE column names during EXPLAIN - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Skip useless calculation of join RTE column names during EXPLAIN
Date
Msg-id E1tNeYK-0005Ps-Nb@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Skip useless calculation of join RTE column names during EXPLAIN.

There's no need for set_simple_column_names() to compute unique
column names for join RTEs, because a finished plan tree will
not contain any join alias Vars that we could need names for.
Its other, internal callers will not pass it any join RTEs
anyway, so the upshot is we can just skip join RTEs here.

Aside from getting rid of a klugy against-its-documentation use of
set_relation_column_names, this can speed up EXPLAIN substantially
when considering many-join queries, because the upper join RTEs
tend to have a lot of columns.

Sami Imseih, with cosmetic changes by me

Discussion: https://postgr.es/m/CAA5RZ0th3q-0p1pri58z9grG8r8azmEBa8o1rtkwhLmJg_cH+g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7a80e381d16c642d00ec6146ccdf1262a159c69e

Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Melanie Plageman
Date:
Subject: pgsql: Count pages set all-visible and all-frozen in VM during vacuum
Next
From: Nathan Bossart
Date:
Subject: pgsql: Accommodate very large dshash tables.