Re: [HACKERS] path toward faster partition pruning

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Amit Langote <amitlangote09(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] path toward faster partition pruning
Date: 2018-03-27 17:46:49
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

Hi Amit,

On 03/27/2018 06:42 AM, Amit Langote wrote:
> I have managed to make the recursion go away in the attached updated
> version. I guess that's the result of employing the idea of a "output
> register" for individual pruning steps as mentioned in Robert's email
> upthread where he detailed the "pruning steps" approach [1].
> With the new patch, pruning steps for arguments of, say, an OR clause are
> not performed recursively. Instead, each pruning step is performed
> independently and its output is stored in a slot dedicated to it. Combine
> steps are always executed after all of the steps corresponding to its
> arguments have been executed. That's ensured by the way steps are allocated.

Running v41 with "partition_prune" under valgrind gives the attached report.

Best regards,

Attachment Content-Type Size
25970.log.gz application/gzip 44.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-03-27 17:48:57 Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()
Previous Message Tomas Vondra 2018-03-27 17:42:39 Re: [HACKERS] PATCH: multivariate histograms and MCV lists