Re: Removing unneeded self joins - Mailing list pgsql-hackers

From David Rowley
Subject Re: Removing unneeded self joins
Date
Msg-id CAKJS1f_x+b5FF4cEpEt3ywEpTGrQrpDYqAkEHmxtMF=usRitSA@mail.gmail.com
Whole thread Raw
In response to Re: Removing unneeded self joins  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Removing unneeded self joins  (Andres Freund <andres@anarazel.de>)
Re: Removing unneeded self joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 17 May 2018 at 08:44, Simon Riggs <simon@2ndquadrant.com> wrote:
> What I was advocating was an approach that varies according to the
> query cost, so we don't waste time trying to tune the heck out of OLTP
> queries, but for larger queries we might take a more considered
> approach.

That's tricky. If we do this, it should be done before Path
generation, so not much is known about the costs in those case.

Perhaps something can be done by looking at the number of relpages,
but I've no idea what that would be. Perhaps we need to see how costly
this operation is first before we try to think of ways to only apply
it conditionally?

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Removing unneeded self joins
Next
From: Alexander Kuzmenkov
Date:
Subject: Re: Removing unneeded self joins