Re: Inserts optimization?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris <dmagick@xxxxxxxxx> writes:
> Francisco Reyes wrote:
>> Doing my first write heavy database.
>> What settings will help improve inserts?
>> Only a handfull of connections, but each doing up to 30 inserts/second.

> If you can, use copy instead:
> http://www.postgresql.org/docs/8.1/interactive/sql-copy.html

Or at least try to do multiple inserts per transaction.

Also, increasing checkpoint_segments and possibly wal_buffers helps a
lot for write-intensive loads.  Try to get the WAL onto a separate disk
spindle if you can.  (These things don't matter for SELECTs, but they
do matter for writes.)

			regards, tom lane


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux