Re: INSERT performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: INSERT performance
Дата
Msg-id 25194.1067981755@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: INSERT performance  (surdules@yahoo.com (Razvan Surdulescu))
Ответы Re: INSERT performance  (Razvan Surdulescu <surdules@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: SELECT question
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: SELECT question