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

Re: Indexing foreign keys

From: Matt Mello <alien(at)spaceship(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Indexing foreign keys
Date: 2003-01-27 20:56:38
Message-ID: 3E359D06.5020408@spaceship.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-performance
Yes, I had not only done a "vacuum full analyze" on the PG db once I 
stuffed it, but I also compared that with an IFX db that I had run 
"update statistics high" on.  Things are much better with the FK indexes.

Did the docs say to index those FK fields (is that standard in the DB 
industry?), or was I just spoiled by IFX doing it for me?  ;)

Thanks!



Chad Thompson wrote:
> Make sure that you've run a vacuum and an analyze.  There is also a
> performance hit if the types of the fields or values are different. ie int
> to int8

-- 
Matt Mello



In response to

Responses

pgsql-performance by date

Next:From: Bruce MomjianDate: 2003-01-27 21:08:59
Subject: Re: 7.3.1 New install, large queries are slow
Previous:From: Matt MelloDate: 2003-01-27 20:39:57
Subject: Indexing foreign keys

pgsql-general by date

Next:From: Chris GamacheDate: 2003-01-27 21:04:15
Subject: Re: 7.3 LOCK TABLE problem
Previous:From: Paul GrendaDate: 2003-01-27 20:43:54
Subject: unsubscribe

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