Re: Removing unneeded self joins

From: Greg Stark <stark(at)mit(dot)edu>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, Hywel Carver <hywel(at)skillerwhale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Removing unneeded self joins
Date: 2022-03-01 02:45:19
Message-ID: CAM-w4HMS0N9y73AzwTwU_K9=25JMs0cTUoo_8MR_83Gh+Ci7wA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I don't think the benchmarking that's needed is to check whether
pruning unnecessary joins is helpful. Obviously it's going to be hard
to measure on simple queries and small tables. But the resulting plan
is unambiguously superior and in more complex cases could extra i/o.

The benchmarking people were looking for in the past was testing the
impact of the extra planning work in cases where it doesn't end up
being applied. I'm not sure what the worst case is, perhaps a many-way
self-join where the join clauses are not suitable for pruning?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-03-01 03:15:16 Re: Allow root ownership of client certificate key
Previous Message Masahiko Sawada 2022-03-01 02:35:32 Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN