Re: [HACKERS] advanced partition matching algorithm for partition-wise join
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: amul sul <sulamul@gmail.com>, Thomas Munro <thomas.munro@gmail.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>,
Dmitry Dolgov <9erthalion6@gmail.com>, Thomas Munro <thomas.munro@enterprisedb.com>,
Antonin Houska <ah@cybertec.at>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-07-19T13:43:54Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Suppress unused-variable warning.
- 401418ca6a68 13.0 landed
-
Allow partitionwise joins in more cases.
- c8434d64ce03 13.0 landed
-
Avoid crash in partitionwise join planning under GEQO.
- 7ad6498fd5a6 12.0 cited
- d70c147fa217 11.3 cited
-
Disable support for partitionwise joins in problematic cases.
- 7cfdc77023ad 12.0 cited
-
Add plan_cache_mode setting
- f7cb2842bf47 12.0 cited
-
Add test for partitionwise join involving default partition.
- 4513d3a4be0b 12.0 cited
-
Revise API for partition_rbound_cmp/partition_rbound_datum_cmp.
- b0229235564f 11.0 landed
On Thu, Jul 18, 2019 at 2:55 AM Etsuro Fujita <etsuro.fujita@gmail.com> wrote: > I.e., partition_bounds_merge() is performed for each pair of input > partitioned relations for a join relation in try_partitionwise_join(). > Since partition_bounds_merge() would need a lot of CPU cycles, I don't > think this is acceptable; ISTM that some redesign is needed to avoid > this. I'm wondering that once we successfully merged partition bounds > from a pair of input partitioned relations for the join relation, by > using the merged partition bounds, we could get the lists of matching > to-be-joined partitions for subsequent pairs of input partitioned > relations for the join relation in a more efficient way than by > performing partition_bounds_merge() as proposed in the patch. I don't know whether partition_bounds_merge() is well-implemented; I haven't looked. But in general I don't see an alternative to doing some kind of merging on each pair of input relations. That's just how planning works, and I don't see why it should need to be prohibitively expensive. I might be missing something, though; do you have an idea? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company