Re: insert - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: insert
Date
Msg-id 20040813150243.GA2004@wolff.to
Whole thread Raw
In response to Re: insert  (Rod Taylor <pg@rbt.ca>)
Responses Re: insert
Re: insert
List pgsql-performance
On Fri, Aug 13, 2004 at 08:57:56 -0400,
  Rod Taylor <pg@rbt.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.

pgsql-performance by date:

Previous
From: "Arash Zaryoun"
Date:
Subject: Weird Database Performance problem!
Next
From: Raoul Buzziol
Date:
Subject: Re: Help specifying new machine