Skip site navigation (1) Skip section navigation (2)

Re: performance of foreign key constraints

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: teknokrat <teknokrat(at)yahoo(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: performance of foreign key constraints
Date: 2003-08-28 17:28:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Thu, 28 Aug 2003, teknokrat wrote:

> I have a table that has about 20 foreign key constraints on it. I think
> this is a bit excessive and am considering removing them ( they are all
> related to the same table and I don't think there is much chance of any
> integrity violations ). Would this improve performance or not?

It depends on your frequency of inserts/updates to the table with the
constraint and the frequency of update/delete to the table(s) being
refered to. My guess is probably.  You may wish to leave some of the
constraints (decide which are the most important), but 20 does seem a bit
excessive in general.

In response to


pgsql-performance by date

Next:From: Michael GuerinDate: 2003-08-28 17:42:35
Subject: Re: Simple queries take forever to run
Previous:From: Andrew SullivanDate: 2003-08-28 17:25:39
Subject: Re: performance of foreign key constraints

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group