Re: Question about foreign key - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Question about foreign key
Date
Msg-id 20021107101833.C23401@mail.libertyrms.com
Whole thread Raw
In response to Question about foreign key  (Terence Leung <tcmleung@yahoo.com>)
List pgsql-general
On Wed, Nov 06, 2002 at 03:49:49AM -0800, Terence Leung wrote:
> Dear sir,
>     Hi, I am Terence and using Postgresql 7.0 in linux
> server and the web server can connect the database.

You'll be wanting to upgrade that.  7.0 is old and has had several
bugs fixed.

> Can the added foreign key improve the above sql
> performance so that it can search faster
>    or the foreign key can only maintain the data
> integrity but cannot make the search faster?

It is only an integrity contraint.  It makes no difference to speed
(well, that's not true.  It slows some other things down).

Is you are having a performance problem, all the usual questions
(vacuums, &c) apply.  But do upgrade first.  Among other things,
performance was much improved in 7.2.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Can't connect to PGSQL
Next
From: "Shridhar Daithankar"
Date:
Subject: Re: DB migration from Win (cygwin) to Linux (RH 7.2): 9223372036854775807 error