Re: Removing unneeded self joins

2021-07-06 Thread Hywel Carver
On Mon, Jul 5, 2021 at 2:20 PM Andrey Lepikhov wrote: > On 2/7/21 01:56, Hywel Carver wrote: > > On Wed, Jun 30, 2021 at 12:21 PM Andrey Lepikhov > > mailto:a.lepik...@postgrespro.ru>> wrote: > > I think, here we could ask more general question: d

Re: Removing unneeded self joins

2021-07-01 Thread Hywel Carver
On Wed, Jun 30, 2021 at 12:21 PM Andrey Lepikhov wrote: > On 12/3/21 12:05, Hywel Carver wrote: > > I've built and tested this, and it seems to function correctly to me. > One question I have is whether the added "IS NOT NULL" filters can be > omitted when

Re: Self-join optimisation

2021-03-12 Thread Hywel Carver
y'd normally put in a view. On Thu, Mar 11, 2021 at 10:50 PM Tomas Vondra wrote: > On 3/11/21 3:39 PM, Hywel Carver wrote: > > Great! It looks like it's been in commitfest status for a few years. Is > > there anything someone like me (outside the pgsql-hackers community) can >

Re: Removing unneeded self joins

2021-03-12 Thread Hywel Carver
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested I've built and tested this, and it seems to function correctly to me. One

Re: Self-join optimisation

2021-03-11 Thread Hywel Carver
n Thu, 11 Mar 2021 at 15:15, Hywel Carver wrote: > > > > Hi, > > > > I asked this question in the Postgres Slack, and was recommended to ask > here instead. > > > > A few times, I've been in a situation where I want to join a table to > itself on its prim

Self-join optimisation

2021-03-11 Thread Hywel Carver
Hi, I asked this question in the Postgres Slack, and was recommended to ask here instead. A few times, I've been in a situation where I want to join a table to itself on its primary key. That typically happens because I have some kind of summary view, which I then want to join to the original