Re: insert

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: Ulrich Wisser <ulrich(dot)wisser(at)relevanttraffic(dot)se>, gnari <gnari(at)simnet(dot)is>, Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: insert
Date: 2004-08-13 15:02:43
Message-ID: 20040813150243.GA2004@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Aug 13, 2004 at 08:57:56 -0400,
Rod Taylor <pg(at)rbt(dot)ca> wrote:
> On Fri, 2004-08-13 at 08:10, Ulrich Wisser wrote:
> > Hi,
> >
> > my inserts are done in one transaction, but due to some foreign key
> > constraints and five indexes sometimes the 100 inserts will take more
> > than 5 minutes.
>
> It is likely that you are missing an index on one of those foreign key'd
> items.

I don't think that is too likely as a foreign key reference must be a
unique key which would have an index. I think the type mismatch
suggestion is probably what the problem is.
The current solution is to make the types match. In 8.0.0 it would probably
work efficiently as is, though it isn't normal for foreign keys to have a type
mismatch and he may want to change that anyway.

In response to

  • Re: insert at 2004-08-13 12:57:56 from Rod Taylor

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2004-08-13 15:20:04 Re: Weird Database Performance problem!
Previous Message Arash Zaryoun 2004-08-13 14:43:43 Weird Database Performance problem!