Re: Postgresql INSERT speed (how to improve performance)?

From: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
To: Lim Berger <straightfwd007(at)gmail(dot)com>
Cc: Postgresql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql INSERT speed (how to improve performance)?
Date: 2007-08-14 03:48:27
Message-ID: 46C1260B.4020105@amsoftwaredesign.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Lim Berger wrote:
> On 8/14/07, Andrej Ricnik-Bay <andrej(dot)groups(at)gmail(dot)com> wrote:
>
>> On 8/14/07, Lim Berger <straightfwd007(at)gmail(dot)com> wrote:
>>
>>
>>> 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?
>>>
Lim,

Are you sure you are not confusing Seconds VS Milliseconds from one
query tool to the other?

What tools are you using to show the query times?

As far as I know the psql command line tool shows milliseconds not seconds.

You should probably post some more info like the actual insert query
used and the table.

I have never seen a insert take that long even a big one, unless you
have some network latency to the PGSQL host and it's causing the time to
be messed up on the client.

Might also help to let us know exactly how you are timing this stuff.
Are you connecting remotely via PSQL or are you connecting via SSH and
running psql or mysql that way?

Later,

Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for PostgreSQL and MySQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lim Berger 2007-08-14 03:50:15 Re: Postgresql INSERT speed (how to improve performance)?
Previous Message Tom Lane 2007-08-14 03:20:51 Re: Postgresql INSERT speed (how to improve performance)?