Re: Indexes advantageous on foreign key columns

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Maria(dot)L(dot)Wilson-1(at)nasa(dot)gov
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Indexes advantageous on foreign key columns
Date: 2010-05-26 18:38:45
Message-ID: AANLkTilHC2NWDQLD6F_NzQH37JPIjbu9u2Cbnqg4Q2el@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

2010/5/26 Maria L. Wilson <Maria(dot)L(dot)Wilson-1(at)nasa(dot)gov>

> Was hoping that someone would like to discuss the need for indexes on
> columns that are referenced in a foreign key. Are they necessary? Are they
> worth the overhead? PostgreSQL version 8.4
>
>
That depends. They are not necessary. They are overhead (like all other
indexes). They can be useful, or not be useful. Can be used or not.
All depends mainly on your queries and how many records you have. If you
have enough, the index can be really helpful (of course that depends on the
query that you make).

regards
Szymon Guz

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ray Stell 2010-05-26 21:08:33 command tag logging
Previous Message Maria L. Wilson 2010-05-26 18:33:01 Indexes advantageous on foreign key columns