Increase PostgreSQL write speed at the cost of likely data loss?

前端 未结 8 1121
执笔经年
执笔经年 2021-01-29 19:08

I love that PostgreSQL is crash resistant, as I don\'t want to spend time fixing a database. However, I\'m sure there must be some things I can disable/modify so that i

8条回答
  •  情深已故
    2021-01-29 19:44

    You should also increase checkpoint_segments (e.g. to 32 or even higher) and most probably wal_buffers as well

    Edit:
    if this is a bulk load, you should use COPY to insert the rows. It is much faster than plain INSERTs.

    If you need to use INSERT, did you consider using batching (for JDBC) or multi-row inserts?

提交回复
热议问题