Re: INSERT performance - Mailing list pgsql-general

From Tom Lane
Subject Re: INSERT performance
Date
Msg-id 25194.1067981755@sss.pgh.pa.us
Whole thread Raw
In response to Re: INSERT performance  (surdules@yahoo.com (Razvan Surdulescu))
Responses Re: INSERT performance  (Razvan Surdulescu <surdules@yahoo.com>)
List pgsql-general
surdules@yahoo.com (Razvan Surdulescu) writes:
> DCorbit@connx.com ("Dann Corbit") wrote in message
news:<D90A5A6C612A39408103E6ECDD77B829408C2E@voyager.corporate.connx.com>...
>> 500 records in 12 seconds is about 42/second.  Hard to know if that is
>> good or bad.  Is the machine under heavy use?  Are the records extremely
>> long?

>> Provide the SQL that defines the table and its indexes.

> CREATE INDEX idx_field1 ON data(field1);
> CREATE INDEX idx_field2 ON data(field2);
> ...
> CREATE INDEX idx_field20 ON data(field20);

Uh, do you actually need an index on every column?

It's obvious that the index insertions are where the time is going.
You're getting close to 900 index insertions per second, which is not
bad at all on consumer-grade ATA disk hardware, if you ask me.  It might
help to raise shared_buffers, if you didn't already do that ... but the
real solution here is to only index the columns that you are actually
intending to search on.

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: SELECT question
Next
From: Jan Wieck
Date:
Subject: Re: SELECT question