Skip site navigation (1) Skip section navigation (2)

Re: BufferAccessStrategy for bulk insert

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Postgres Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BufferAccessStrategy for bulk insert
Date: 2008-11-01 17:23:12
Message-ID: 603c8f070811011023n202aea33w4da13b7d14f74134@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
> Can you test whether using the buffer access strategy is a win or a
> loss? Most of that gain is probably coming from the reduction in
> pinning.

Patch resnapped to HEAD, with straightforward adjustments to
compensate for Heikki's changes to the ReadBuffer interface.  See
attached.

New testing results, now with and without BAS:

--TRUNK--
Time: 17945.523 ms
Time: 18682.172 ms
Time: 17047.841 ms
Time: 16344.442 ms
Time: 18727.417 ms

--PATCHED--
Time: 13323.772 ms
Time: 13869.724 ms
Time: 14043.666 ms
Time: 13934.132 ms
Time: 13193.702 ms

--PATCHED with BAS disabled--
Time: 14460.432 ms
Time: 14745.206 ms
Time: 14345.973 ms
Time: 14601.448 ms
Time: 16535.167 ms

I'm not sure why the BAS seemed to be slowing things down before.
Maybe it's different if we're copying into a pre-existing table, so
that WAL is enabled?  Or it could have just been a fluke - the numbers
were close.  I'll try to run some additional tests if time permits.

...Robert

Attachment: bulk_insert-v2.patch
Description: text/x-diff (29.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-11-01 17:38:38
Subject: Re: BufferAccessStrategy for bulk insert
Previous:From: Simon RiggsDate: 2008-11-01 16:32:18
Subject: Hot Standby (commit fest version - v5)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group