Re: Slow performance with trivial self-joins
Adam Brusselback <adambrusselback@gmail.com>
From: Adam Brusselback <adambrusselback@gmail.com>
To: Benny Kramek <benny@medflyt.com>
Cc: pgsql-performance@lists.postgresql.org
Date: 2020-02-05T22:12:21Z
Lists: pgsql-performance
> You can create a library of > reusable views that are small, easy-to-understand and readable. Then > you build them up into bigger views, and finally query from them. But > then you end up with lots of (hidden) self-joins. I will concur with this use case being pretty common, but also something I have actively avoided anywhere performance is important because of the lack of this optimization. Even still, I have 20+ views like that in my database.