Re: Questions regarding indexes

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Bruno Lavoie" <bruno(dot)lavoie(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Questions regarding indexes
Date: 2009-01-16 19:39:09
Message-ID: dcc563d10901161139m1b0aa20aw8466304db37e0c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 16, 2009 at 8:47 AM, Bruno Lavoie <bruno(dot)lavoie(at)gmail(dot)com> wrote:
> Hello,
>
> are these statements true:
>
> «You should always index fks. The only exception is when the matching unique
> or primary key is never updated or deleted» ?

No. If the table that fks to another table has 10 rows and will never
have more than a few hundred, why index it?

> «Small tables do not require indexes» ?

Usually true, except for unique indexes, which provide more
functionality than just indexing.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-01-16 20:15:40 Re: Questions regarding indexes
Previous Message Scott Marlowe 2009-01-16 19:28:10 Re: Query sometimes takes down server