Re: How to improve insert speed with index on text column - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: How to improve insert speed with index on text column
Date
Msg-id CAOR=d=2u2ytFJumtdHB+QirgKtRcPChqY8sjqtD-gMzWj8H=kA@mail.gmail.com
Whole thread Raw
In response to Re: How to improve insert speed with index on text column  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-performance
On Tue, Jan 31, 2012 at 1:20 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> yeah -- postgresql.conf settings are not going to play a big role here unless:
> *) you defer index build to the end of the load, and do CREATE INDEX
> and crank maintenance_work_mem
> *) you are doing lots of transactions and relax your sync policy via
> synchronous_commit

checkpoint segments sometimes helps for loading large amounts of data.

> what's almost certainly happening here is that the text index is
> writing out a lot more data.  what's the average length of your key?

Yeah, the OP really needs to switch to hashes for the indexes.  And
like another poster mentioned, it's often faster to use a btree of
hashes than to use the built in hash index type.

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: How to improve insert speed with index on text column
Next
From: Robert Haas
Date:
Subject: Re: How to remove a table statistics ?