Re: Indexing foreign keys

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Indexing foreign keys
Дата
Msg-id 20030127234454.N88775-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Indexing foreign keys  (Matt Mello <alien@spaceship.com>)
Список pgsql-performance
On Mon, 27 Jan 2003, Matt Mello wrote:

> Yes.  In IFX, when you create a FK, it seems to create indexes
> automatically for you, just like PG does with PK's.
>
> 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.


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

Предыдущее
От: Matt Mello
Дата:
Сообщение: Re: Indexing foreign keys
Следующее
От: Curt Sampson
Дата:
Сообщение: Re: 7.3.1 New install, large queries are slow