pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arne Roland <A.Roland@index.de>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Disabling options lowers the estimated cost of a query
Date: Thu, 25 Feb 2021 23:07:08 +0000
Message-ID: <1581042da8044e71ada2d6e3a51bf7bb@index.de> (raw)

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

Attachments:

  exhaustive_search.txt (text/plain, 271.7K) download

view thread (2+ messages)  latest in thread

Message-ID: <1581042da8044e71ada2d6e3a51bf7bb@index.de>
Permalink:  ../1581042da8044e71ada2d6e3a51bf7bb@index.de/
Also on:    postgresql.org/message-id/1581042da8044e71ada2d6e3a51bf7bb@index.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: A.Roland@index.de
  Subject: Re: Disabling options lowers the estimated cost of a query
  In-Reply-To: <1581042da8044e71ada2d6e3a51bf7bb@index.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox