Re: Parallel INSERT (INTO ... SELECT ...)

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Tang, Haiying" <tanghy(dot)fnst(at)cn(dot)fujitsu(dot)com>
Cc: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)fujitsu(dot)com>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Antonin Houska <ah(at)cybertec(dot)at>
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Date: 2021-01-18 08:28:03
Message-ID: CAA4eK1JZu=L4wg3GF1T50ame6c9-6W0Gj1eNQFwh9rmsEjqrGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 18, 2021 at 1:02 PM Tang, Haiying
<tanghy(dot)fnst(at)cn(dot)fujitsu(dot)com> wrote:
>
> > From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> > > Can we test cases when we have few rows in the Select table (say
> > > 1000) and there 500 or 1000 partitions. In that case, we won't
> > > select parallelism but we have to pay the price of checking
> > > parallel-safety of all partitions. Can you check this with 100, 200,
> > > 500, 1000 partitions table?
> >
> > I also wanted to see such an extreme(?) case. The 1,000 rows is not
> > the count per partition but the total count of all partitions.e.g.,
> > when # of partitions is 100, # of rows per partition is 10.
>
> Below results are in serial plan which select table total rows are 1,000. The Excution Time + Planning Time is still less than unpatched.
> (does this patch make some optimizes in serial insert? I'm a little confused here, Because the patched execution time is less than unpatched, but I didn't find information in commit messages about it. If I missed something, please kindly let me know.)
>

I don't think the patch should have any impact on the serial case. I
think you can try to repeat each test 3 times both with and without a
patch and take the median of the three.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-01-18 08:30:22 Re: Wrong usage of RelationNeedsWAL
Previous Message tsunakawa.takay@fujitsu.com 2021-01-18 08:23:29 RE: Parallel INSERT (INTO ... SELECT ...)