Re: [HACKERS] Runtime Partition Pruning

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Beena Emerson <memissemerson(at)gmail(dot)com>, amul sul <sulamul(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: [HACKERS] Runtime Partition Pruning
Date: 2017-12-06 07:51:15
Message-ID: CAKJS1f-dnkbs2Kqj_2HKO7H=x6DjhJMNgYeUdXyWfrE5WcgJNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2 December 2017 at 08:04, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Dec 1, 2017 at 6:20 AM, Beena Emerson <memissemerson(at)gmail(dot)com> wrote:
>> David Q1:
>> postgres=# explain analyse execute ab_q1 (3,3); --const
>> QUERY PLAN
>> ---------------------------------------------------------------------------------------------------------
>> Append (cost=0.00..43.90 rows=1 width=8) (actual time=0.006..0.006
>> rows=0 loops=1)
>> -> Seq Scan on ab_a3_b3 (cost=0.00..43.90 rows=1 width=8) (actual
>> time=0.005..0.005 rows=0 loops=1)
>> Filter: ((a = 3) AND (b = 3))
>> Planning time: 0.588 ms
>> Execution time: 0.043 ms
>> (5 rows)
>
> I think the EXPLAIN ANALYZE input should show something attached to
> the Append node so that we can tell that partition pruning is in use.
> I'm not sure if that is as simple as "Run-Time Partition Pruning: Yes"
> or if we can give a few more useful details.

It already does. Anything subnode with "(never executed)" was pruned
at runtime. Do we really need anything else to tell us that?

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-12-06 08:03:19 Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Previous Message Michael Paquier 2017-12-06 07:32:03 Re: Error bundling script file with extension when event trigger commands are used