Re: Optimizing for writes. Data integrity not critical

От: Tom Lane
Тема: Re: Optimizing for writes. Data integrity not critical
Дата: ,
Msg-id: 10301.1116546301@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Optimizing for writes. Data integrity not critical  ("Steinar H. Gunderson")
Список: pgsql-performance

Скрыть дерево обсуждения

Optimizing for writes. Data integrity not critical  (Steve Bergman, )
 Re: Optimizing for writes. Data integrity not critical  ("Steinar H. Gunderson", )
  Re: Optimizing for writes. Data integrity not critical  (Tom Lane, )
 Re: Optimizing for writes. Data integrity not critical  (Christopher Kings-Lynne, )
  Re: Optimizing for writes. Data integrity not critical  (Alex Stapleton, )
 Re: Optimizing for writes. Data integrity not critical  (Alex Stapleton, )

"Steinar H. Gunderson" <> writes:
> On Thu, May 19, 2005 at 05:21:07PM -0500, Steve Bergman wrote:
>> I'm doing the writes individually.  Is there a better way?  Combining
>> them all into a transaction or something?

> Batching them all in one or a few transactions will speed it up a _lot_.
> Using COPY would help a bit more on top of that.

Also, if you really don't need to worry about data integrity, turning
off fsync in the config file will probably help.  (Though since it's
an IDE drive, maybe not, as the drive may be lying about write complete
anyway.)

Increasing checkpoint_segments will help too, at the cost of disk space
(about 32MB per increment in the value, IIRC).  I'd suggest pushing it
up enough so you don't incur a checkpoint while the time-critical
operation runs.  checkpoint_timeout may be too small too.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Optimizing for writes. Data integrity not critical
От: "Joel Fradkin"
Дата:
Сообщение: performance on a querry with many group by's any way to speed it up?