pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Wampler <swampler@noao.edu>
To: Postgres-performance <pgsql-performance@postgresql.org>
Subject: Help tracking down problem with inserts slowing down...
Date: Fri, 05 Dec 2003 14:51:48 -0700
Message-ID: <1070661108.20063.86.camel@weaver.tuc.noao.edu> (raw)


I need some help tracking down a sudden, massive slowdown
in inserts in one of our databases.

PG: 7.2.3  (RedHat 8.0)

Background.  We currently run nearly identical systems
at two sites: Site A is a 'lab' site used for development,
Site B is a production site.

The databases in question have identical structure:

  A simple table with 4 columns with a trigger function
     on inserts (which checks to see if the entry already
     exists, and if so, changes the insert into an update...)
  A simple view with 4 columns into the above table.

All access is through jdbc (JDK 1.3.1, jdbc 7.1-1.3),
postgresql.conf's are identical.

The two sites were performing at comparable speeds until
a few days ago, when we deleted several million records
from each database and then did a vacuum full; analyze
on both.  Now inserts at Site B are several orders of
magnitude slower than at Site A.  The odd thing is that
Site B's DB now has only 60,000 records while Site A's is
up around 3 million.  Inserts at A average 63ms, inserts
at B are now up at 4.5 seconds!

EXPLAIN doesn't show any difference between the two.

Can someone suggest ways to track this down?  I don't know
much about postgresql internals/configuration.

Thanks!
Steve
-- 
Steve Wampler -- swampler@noao.edu
The gods that smiled on your birth are now laughing out loud.



view thread (9+ messages)  latest in thread

Message-ID: <1070661108.20063.86.camel@weaver.tuc.noao.edu>
Permalink:  ../1070661108.20063.86.camel@weaver.tuc.noao.edu/
Also on:    postgresql.org/message-id/1070661108.20063.86.camel@weaver.tuc.noao.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: swampler@noao.edu
  Subject: Re: Help tracking down problem with inserts slowing down...
  In-Reply-To: <1070661108.20063.86.camel@weaver.tuc.noao.edu>
  References: <1070661108.20063.86.camel@weaver.tuc.noao.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox