Re: How to improve insert speed with index on text column

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Saurabh <saurabh(dot)b85(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to improve insert speed with index on text column
Date: 2012-01-30 20:32:25
Message-ID: CAMkU=1xUVrz9reeUgXGQYht12WPaf4yEBoX-rKa5kAq-u0jE5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jan 30, 2012 at 9:46 AM, Saurabh <saurabh(dot)b85(at)gmail(dot)com> wrote:
> Thank you for the information.
>
> Schema of table is:
>
> ID                         bigint
> company_name     text
> data_set                text
> time                      timestamp
> Date                     date
>
> Length of company_name is not known so it is of datatype text. I need
> to build the index on company_name and ID. And then insert the
> records. I can not create the index after insertion because user can
> search the data as well while insertion.
>
> Machine is of 8 core, os centos6 and 8 GB of RAM.
>
> Here is my configuration:
>
> shared_buffers = 32MB

That is very small for your server. I'd use at least 512MB, and maybe 2GB

> wal_buffers = 1024KB

If you are using 9.1, I would have this set to the default of -1 and
let the database decide for itself what to use.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alessandro Gagliardi 2012-01-30 20:35:04 Re: Why should such a simple query over indexed columns be so slow?
Previous Message Claudio Freire 2012-01-30 19:24:54 Re: Why should such a simple query over indexed columns be so slow?