pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arne Roland <A.Roland@index.de>
To: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Partial join
Date: Thu, 1 Aug 2019 08:07:25 +0000
Message-ID: <dd01626a46a342f7b1d811cf38fcebe6@index.de> (raw)
In-Reply-To: <9dc03e949e9b4327a0d074da9ab44318@index.de>
References: <9dc03e949e9b4327a0d074da9ab44318@index.de>

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? Do you have better ideas?


Regards
Arne

Attachments:

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

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

view thread (9+ messages)  latest in thread

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