Disabling options lowers the estimated cost of a query

From: Arne Roland <A(dot)Roland(at)index(dot)de>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Disabling options lowers the estimated cost of a query
Date: 2021-02-25 23:07:08
Message-ID: 1581042da8044e71ada2d6e3a51bf7bb@index.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

I want to examine the exhaustive search and not the geqo here. I'd expect the exhaustive search to give the plan with the lowest cost, but apparently it doesn't. I have found a few dozen different querys where that isn't the case. I attached one straight forward example. For the join of two partitions a row first approach would have been reasonable.

Please note that I have enable_partitionwise_join on.

Both tables are partitioned by si, agv and have a primary key leading with si, agv.

I know that for this particular query the planning time dominates the execution time, but that is not my issue here. It's more a synthetic boiled down example coming from a more complex one with notably higher execution time.

Thank you for having a look!

Regards

Arne

Attachment Content-Type Size
exhaustive_search.txt text/plain 271.7 KB

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pitts 2021-02-26 01:06:15 Re: Postgres performance comparing GCP and AWS
Previous Message Philip Semanchuk 2021-02-25 22:32:32 Re: Postgres performance comparing GCP and AWS