Postgresql INSERT speed (how to improve performance)?

From: "Lim Berger" <straightfwd007(at)gmail(dot)com>
To: "Postgresql General List" <pgsql-general(at)postgresql(dot)org>
Subject: Postgresql INSERT speed (how to improve performance)?
Date: 2007-08-14 02:41:03
Message-ID: 69d2538f0708131941u36292038n2cf4c98b1be2cbba@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I've googled and yahooed and most of the performance tweaks suggested
cover SELECT speed, some cover COPY speed with things like turning
fsync off and such. But I still have not found how to improve regular
INSERT speed on Postgresql.

I have a table in MySQL with three compound indexes. I have only three
columns from this table also in PostgreSQL, which serves as a cache of
sorts for fast queries, and this table has only ONE main index on the
primary key!

INSERTing into MySQL takes 0.0001 seconds per insert query.
INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query.

What can I do to improve this performance? What could be going wrong
to elicit such poor insertion performance from Postgresql?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lim Berger 2007-08-14 02:47:39 Re: "Out of memory" errors..
Previous Message snewman18@gmail.com 2007-08-14 02:41:00 How can I avoid PGPool as a single point of failure?