FK index q'n

Поиск
Список
Период
Сортировка
От rihad
Тема FK index q'n
Дата
Msg-id 47500E66.90601@mail.ru
обсуждение исходный текст
Ответы Re: FK index q'n
Список pgsql-general
Given this table:

CREATE TABLE foo (
     id integer primary key,
     bar_id integer references bar (id)
);
and provided that bar.id is itself a PK, do I still need to create an
index on bar_id if often doing queries like:
SELECT MIN(id) FROM foo WHERE bar_id IS NULL;

Table foo will contain a static number of rows (from 2,000 to 10,000 --
yet undecided) only doing SELECT & UPDATE.

Thanks.

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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: PostgresSQL vs Ingress
Следующее
От: "Peter Childs"
Дата:
Сообщение: Re: PostgresSQL vs Ingress