Re: Slow Foreign Key - Mailing list pgsql-admin

From Sam Barnett-Cormack
Subject Re: Slow Foreign Key
Date
Msg-id Pine.LNX.4.58.0403222134180.2639@short.lancs.ac.uk
Whole thread Raw
In response to Re: Slow Foreign Key  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Slow Foreign Key  (Ricardo Vaz Mannrich <rvm_l1@silcom.com.br>)
List pgsql-admin
On Mon, 22 Mar 2004, Tom Lane wrote:

> Ricardo Vaz Mannrich <rvm_l1@silcom.com.br> writes:
> > Is FOREIGN KEY so slow like that?
>
> Not normally.  Have you checked that the referencing and referenced
> columns are of the same datatype?  Have you done ANALYZE on both tables
> recently?

Other question that seems, from my experience, to be relevant - are the
referenced/referencing columns indexed?

--

Sam Barnett-Cormack
Software Developer                           |  Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk)  |  Lancaster University

pgsql-admin by date:

Previous
From: "Subbiah, Stalin"
Date:
Subject: Databases Vs. Schemas
Next
From: Tom Lane
Date:
Subject: Re: Databases Vs. Schemas