Re: pg_restore and create FK without verification check

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: ow <oneway_111(at)yahoo(dot)com>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_restore and create FK without verification check
Date: 2003-11-27 16:25:32
Message-ID: 20031127162532.GE25984@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 26, 2003 at 10:11:20PM -0800, ow wrote:
> --- Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> wrote:
> > On Thu, Nov 27, 2003 at 12:40:28AM +0100, Andreas Pflug wrote:
> >
> > > A common mistake, can't count how often I created this one... And not
> > > easy to find, because EXPLAIN won't explain triggers.
> >
> > That's a pity. And the lack of EXPLAINing function execution, too.
> > Maybe it's not that hard to do?
>
> I'd like to emphasize again that NOT having an index on the FK column is a
> perfectly valid approach, despite some opinions to the contrary.

In what scenarios? I'd easily buy this if you are talking about small
tables.

> Also, FK column index DOES NOT, in general, solve performance issues
> with FK verification check. Someone may (and, I'm sure, will) simply
> have more data or more constraints.

More data? Hmm ... if you have a lot of data in the referenced table,
you'd better _have_ an index unless you want a lot of seqscans.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La tristeza es un muro entre dos jardines" (Khalil Gibran)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2003-11-27 16:25:35 support of compound words in contrib/tsearch2
Previous Message Dave Cramer 2003-11-27 15:28:07 Re: Functions with COPY