Re: Slow performance with trivial self-joins

2020-02-05 Thread Benny Kramek
Thank you for your response. I have tested out the patch in the linked thread and it works very well on a bunch of complex queries that I have tested, improving both the planning time significantly and the execution time drastically. I have also read through the entire linked discussion thread as

Slow performance with trivial self-joins

2020-02-03 Thread Benny Kramek
Hello, I am experiencing slow performance when joining a table against itself on its primary key column. I expect the query plan to be identical for both of the below queries (and I expect the performance to also be identical). But the second one is much slower: The FAST QUERY has a planning