Re: Cost model for parallel CREATE INDEX

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cost model for parallel CREATE INDEX
Date: 2017-03-04 14:00:04
Message-ID: 20170304140004.GF9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter,

* Peter Geoghegan (pg(at)bowt(dot)ie) wrote:
> On Sat, Mar 4, 2017 at 12:50 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > If the result of
> > compute_parallel_workers() based on min_parallel_table_scan_size is
> > smaller, then use that value instead. I must be confused, because I
> > actually though that was the exact algorithm you were describing, and
> > it sounded good to me.
>
> It is, but I was using that with index size, not table size. I can
> change it to be table size, based on what you said. But the workMem
> related cap, which probably won't end up being applied all that often
> in practice, *should* still do something with projected index size,
> since that really is what we're sorting, which could be very different
> (e.g. with partial indexes).

Isn't that always going to be very different, unless you're creating a
single index across every column in the table..? Or perhaps I've
misunderstood what you're comparing as being 'very different' in your
last sentence.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2017-03-04 14:12:28 Re: PATCH: Make pg_stop_backup() archive wait optional
Previous Message Julian Markwort 2017-03-04 13:56:13 Re: [FEATURE PATCH] pg_stat_statements with plans