pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: agile.data.analytics@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Subject: Re: BUG #15430: partition-wise join only works in combination with pruning on 1 partition
Date: Mon, 15 Oct 2018 13:18:39 +0900
Message-ID: <ab8545cc-3a86-ffae-1d17-fe496b4594a9@lab.ntt.co.jp> (raw)
In-Reply-To: <15430-ee54c4208e54e9b1@postgresql.org>
References: <15430-ee54c4208e54e9b1@postgresql.org>

Hi,

On 2018/10/15 0:20, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      15430
> Logged by:          Bart Debersaques
> Email address:      agile.data.analytics@gmail.com
> PostgreSQL version: 11rc1
> Operating system:   Centos 7
> Description:        

[ ... ]

> psql <<-EOF
> explain 
> select * 
> from 
> part_test.measurement m1
> inner join part_test.measurement2 m2
> on m1.city_id = m2.city_id and m1.logdate = m2.logdate
> where m1.logdate in ('2006-02-01'::date, '2006-03-01'::date)
EOF
> #  Hash Join  (cost=66.97..170.25 rows=3 width=32)
> #   Hash Cond: ((m2.city_id = m1.city_id) AND (m2.logdate = m1.logdate))
> #   ->  Append  (cost=0.00..75.50 rows=3700 width=16)
> #         ->  Seq Scan on measurement2_y2006m02 m2  (cost=0.00..28.50
> rows=1850 width=16)
> #         ->  Seq Scan on measurement2_y2006m03 m2_1  (cost=0.00..28.50
> rows=1850 width=16)
> #   ->  Hash  (cost=66.43..66.43 rows=36 width=16)
> #         ->  Append  (cost=0.00..66.43 rows=36 width=16)
> #               ->  Seq Scan on measurement_y2006m02 m1  (cost=0.00..33.12
> rows=18 width=16)
> #                     Filter: (logdate = ANY
> ('{2006-02-01,2006-03-01}'::date[]))
> #               ->  Seq Scan on measurement_y2006m03 m1_1  (cost=0.00..33.12
> rows=18 width=16)
> #                     Filter: (logdate = ANY
> ('{2006-02-01,2006-03-01}'::date[]))
> 
> # conclusion: join performed on full tab scans, join not performed on a
> per-partion basis

Have you changed the value of enable_partitionwise_join parameter to 'on'?
 It's 'off' by default, so join is not performed on per-partition basis.

Thanks,
Amit





view thread (4+ messages)  latest in thread

Message-ID: <ab8545cc-3a86-ffae-1d17-fe496b4594a9@lab.ntt.co.jp>
Permalink:  ../ab8545cc-3a86-ffae-1d17-fe496b4594a9@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/ab8545cc-3a86-ffae-1d17-fe496b4594a9@lab.ntt.co.jp

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, noreply@postgresql.org
  Subject: Re: BUG #15430: partition-wise join only works in combination with pruning on 1 partition
  In-Reply-To: <ab8545cc-3a86-ffae-1d17-fe496b4594a9@lab.ntt.co.jp>
  References: <15430-ee54c4208e54e9b1@postgresql.org> <ab8545cc-3a86-ffae-1d17-fe496b4594a9@lab.ntt.co.jp>

* 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