Re: insert performance riddle

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Michael Fuhr <mike(at)fuhr(dot)org>
Subject: Re: insert performance riddle
Date: 2005-08-11 18:59:32
Message-ID: 200508111259.32465.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday August 11 2005 12:36 pm, Ed L. wrote:
> On Wednesday August 10 2005 6:03 pm, Michael Fuhr wrote:
> > On Wed, Aug 10, 2005 at 05:02:46PM -0600, Ed L. wrote:
> > > I have two identical servers giving abysmal INSERT
> > > performance in pgsql 7.3.4, 7.4.8, and 8.1devel under no
> > > load or I/O contention at all (no dumps, no vacuums, no
> > > apps, etc). Any suggested investigations appreciated...
> >
> > Have you done any tests that eliminate the client code and
> > client-server communcation? Something like the following:
> >
>
> Michael, you seem to have nailed it. The local inserts (via
> Unix domain sockets?) that were running at 6 QPS ran at 6800
> to 41000 QPS in a PL/pgSQL function.

Here's another part of the riddle. The query durations for the
individual inserts as logged in the server log are ranging
100ms-500ms per insert when connecting via DBI/DBD::Pg from
localhost. Inside pl/pgsql, they're clearly averaging faster
than 1ms per insert. I would have thought those times were
independent of the client communication layers...?

Ed

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian Goetze 2005-08-11 19:07:40 Upgrading 7.3.9 -> 7.4.8 - trouble with blobs
Previous Message Ed L. 2005-08-11 18:36:58 Re: insert performance riddle