Re: Slow PostgreSQL 10.6 query

2019-10-01 Thread Behrang Saeedzadeh
Thanks. That eliminated the bottleneck! Any ideas why adding ORDER BY to the subquery also changes the plan in a way that eliminates the bottleneck? Best regards, Behrang Saeedzadeh blog.behrang.org On Tue, 1 Oct 2019 at 23:27, Tom Lane wrote: > Behrang Saeedzadeh writes: > > On m

Re: Slow PostgreSQL 10.6 query

2019-10-07 Thread Behrang Saeedzadeh
Thanks for the tip! Regards, Behrang (sent from my mobile) On Mon, Oct 7, 2019, 07:37 Tomas Vondra wrote: > On Tue, Oct 01, 2019 at 11:42:33PM +1000, Behrang Saeedzadeh wrote: > >Thanks. That eliminated the bottleneck! > > > >Any ideas why adding ORDER BY to the subquery

Get the planner used by a query?

2019-10-08 Thread Behrang Saeedzadeh
Is there a way to display the planner algorithm used by a query, either in EXPLAIN or in a different way? Regards, Behrang (sent from my mobile)

Query slow again after adding an `OR` operation (was: Slow PostgreSQL 10.6 query)

2019-10-09 Thread Behrang Saeedzadeh
om_collapse_limit (I tried up to 30) but couldn't improve the performance (I also increased geqo_threshold to join_collapse_limit + 2). Any chance of making PostgreSQL 10.6 choose a better plan without rewriting the Hibernate generated query? Best regards, Behrang Saeedzadeh blog.behrang.org