Re: Parallel Seq Scan - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Parallel Seq Scan
Date
Msg-id CAFj8pRCYEYS+jnWCujp2+QMqMJjtaRNSc_4zoNtb5YcYRDVoQQ@mail.gmail.com
Whole thread Raw
In response to Re: Parallel Seq Scan  (Thom Brown <thom@linux.com>)
Responses Re: Parallel Seq Scan  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers


2015-11-11 16:18 GMT+01:00 Thom Brown <thom@linux.com>:
On 11 November 2015 at 14:53, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Nov 9, 2015 at 11:15 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Okay, I have updated the patch to make seq scan node parallel aware.
>> To make that happen we need to have parallel_aware flag both in Plan
>> as well as Path, so that we can pass that information from Path to Plan.
>> I think the right place to copy parallel_aware info from path to
>> plan is copy_path_costsize and ideally we should change the name
>> of function to something like copy_generic_path_info(), but for
>> now I have retained it's original name as it is used at many places,
>> let me know if you think we should goahead and change the name
>> of function as well.
>>
>> I have changed Explain as well so that it adds Parallel for Seq Scan if
>> SeqScan node is parallel_aware.
>>
>> I have not integrated it with consider-parallel patch, so that this and
>> Partial Seq Scan version of the patch can be compared without much
>> difficulity.
>>
>> Thoughts?
>
> I've committed most of this, except for some planner bits that I
> didn't like, and after a bunch of cleanup.  Instead, I committed the
> consider-parallel-v2.patch with some additional planner bits to make
> up for the ones I removed from your patch.  So, now we have parallel
> sequential scan!
>
> For those following along at home, here's a demo:
>
> rhaas=# \timing
> Timing is on.
> rhaas=# select * from pgbench_accounts where filler like '%a%';
>  aid | bid | abalance | filler
> -----+-----+----------+--------
> (0 rows)
>
> Time: 743.061 ms
> rhaas=# set max_parallel_degree = 4;
> SET
> Time: 0.270 ms
> rhaas=# select * from pgbench_accounts where filler like '%a%';
>  aid | bid | abalance | filler
> -----+-----+----------+--------
> (0 rows)
>
> Time: 213.412 ms
>
> This is all pretty primitive at this point - there are still lots of
> things that need to be fixed and improved, and it applies to only the
> very simplest cases at present, but, hey, parallel query.  Check it
> out.

Congratulations to both you and Amit.  This is a significant landmark
in PostgreSQL feature development.

+1

Pavel
 

Thom


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Parallel Seq Scan
Next
From: Nikolay Shaplov
Date:
Subject: Re: pageinspect patch, for showing tuple data