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@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Partial join
Date: Mon, 29 Jul 2019 16:43:05 +0000
Message-ID: <9dc03e949e9b4327a0d074da9ab44318@index.de> (raw)

Hello,


I attached one example of a partitioned table with multi column partition key. I also attached the output.

Disabling the hash_join is not really necessary, it just shows the more drastic result in the case of low work_mem.


Comparing the first and the second query I was surprised to see that SET enable_partitionwise_join could cause the costs to go up. Shouldn't the paths of the first query be generated as well?



The third query seems to have a different issue. That one is close to my original performance problem. It looks to me like the push down of the sl condition stops the optimizer considering a partial join.

If so would it be sane to keep a copy of the original quals to make the partial join possible?


Regards

Arne

Attachments:

  [application/sql] querys.sql (2.3K, ../9dc03e949e9b4327a0d074da9ab44318@index.de/3-querys.sql)
  download

  [application/sql] explain_analyze.sql (7.7K, ../9dc03e949e9b4327a0d074da9ab44318@index.de/4-explain_analyze.sql)
  download

view thread (9+ messages)  latest in thread

Message-ID: <9dc03e949e9b4327a0d074da9ab44318@index.de>
Permalink:  ../9dc03e949e9b4327a0d074da9ab44318@index.de/
Also on:    postgresql.org/message-id/9dc03e949e9b4327a0d074da9ab44318@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, pgsql-performance@lists.postgresql.org
  Subject: Re: Partial join
  In-Reply-To: <9dc03e949e9b4327a0d074da9ab44318@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