Re: WIP: Fast GiST index build

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Fast GiST index build
Date: 2011-08-12 10:59:55
Message-ID: CAPpHfdsj0oS2OoYzJnF=xa3Xf2_-yLDGSVQ_SWpQ_p1P83sceg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 12, 2011 at 12:23 PM, Heikki Linnakangas <
heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> I think it would also be fairly simple to decrease levelstep and/or adjust
> buffersize on-the-fly. The trick would be in figuring out the heuristics on
> when to do that.
>
I would be simple to decrease levelstep to the it's divider. It seems quite
hard to dicrease it, for example, from 3 to 2. Also, it's pretty hard to
detect that sub-tree actually doen't fit to the cache. I don't see much
difficulties in buffersize runtime tuning.

> Another thing occurred to me while looking at the buffer emptying process:
> At the moment, we stop emptying after we've flushed 1/2 buffer size worth of
> tuples. The point of that is to avoid overfilling a lower-level buffer, in
> the case that the tuples we emptied all landed on the same lower-level
> buffer. Wouldn't it be fairly simple to detect that case explicitly, and
> stop the emptying process only if one of the lower-level buffers really
> fills up? That should be more efficient, as you would have "swap" between
> different subtrees less often.

Yes, it seems reasonable to me.

------
With best regards,
Alexander Korotkov.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-08-12 11:09:00 bgwriter and checkpoints
Previous Message Simon Riggs 2011-08-12 10:53:36 Re: our buffer replacement strategy is kind of lame