Re: GIST create index very very slow

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, worthy7 <worthy(dot)vii(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIST create index very very slow
Date: 2014-08-18 20:41:00
Message-ID: 53F264DC.1010502@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/18/2014 07:47 PM, Robert Haas wrote:
> I think something's missing from your report, though, because if there
> is 3.5 Mb/s of write I/O and only 8 b/s of file growth, nearly all of
> the writes are doing something other than extending that file.

Hmm. Sounds like it's churning through temporary files. Gist build
creates a bunch of buffers that spill to disk, to temporary files, until
it begins writing the tuples out to the actual relation.

But there haven't been any changes to that since 9.1, when the new gist
build algorithm was introduced. Make sure you have maintenance_work_mem
set high enough; that affects the size of the gist build buffers.

Worthy7, you'll have to provide a lot more details for anyone to help
you further. A reproducible test case would be ideal.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-08-18 20:55:13 Re: [PATCH] Incremental backup: add backup profile to base backup
Previous Message Greg Stark 2014-08-18 19:06:58 Re: Reporting the commit LSN at commit time