Re: [PERFORM] Indexing foreign keys

Поиск
Список
Период
Сортировка
От Gregory Wood
Тема Re: [PERFORM] Indexing foreign keys
Дата
Msg-id 020301c2c715$03cef290$7889ffcc@comstock.com
обсуждение исходный текст
Список pgsql-general
> > In fact, I can't imagine a situation where you would NOT want a FK
> > indexed.  I guess there must be one, or else I'm sure the developers
> > would have already added auto-creation of indexes to the FK creation, as
> > well.
>
> Any case where the pk table is small enough and the values are fairly
> evenly distributed so that the index isn't very selective.  You end up not
> using the index anyway because it's not selective and you pay the costs
> involved in keeping it up to date.

Or you want an index on two or more fields that includes the FK as the
primary field. No sense in making two indexes.

Greg


В списке pgsql-general по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: If you are trying to unsubscribe, please READ THIS ...
Следующее
От: Chris Gamache
Дата:
Сообщение: Re: 7.3 LOCK TABLE problem