Indexes advantageous on foreign key columns

Indexes advantageous on foreign key columns

am 26.05.2010 20:33:01 von Maria.L.Wilson-1

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

thanks, Maria Wilson
Nasa, Langley Research Center
Hampton, Virginia 23681

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Indexes advantageous on foreign key columns

am 26.05.2010 20:38:45 von Szymon Guz

--00163646cf3a7d236604878395a4
Content-Type: text/plain; charset=UTF-8

2010/5/26 Maria L. Wilson

> 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

--00163646cf3a7d236604878395a4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

2010/5/26 Maria L. Wilson <=
&=
gt;

border-left:1px #ccc solid;padding-left:1ex;">
Was hoping that someone would like to discuss the need for indexes on colum=
ns that are referenced in a foreign key.  Are they necessary?  Ar=
e 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 u=
seful. 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 hel=
pful (of course that depends on the query that you make).


regards
Szymon Guz 


--00163646cf3a7d236604878395a4--