Partial indexes

Поиск
Список
Период
Сортировка
От elein
Тема Partial indexes
Дата
Msg-id 20060418214815.GU20430@varlena.com
обсуждение исходный текст
Ответы Re: Partial indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
In 8.1.2.

Table contains columns:
    keyp1 not null, keyp2 not null, keyp3 nullable.

The queries will be separated into two kinds:
one on those rows where keyp3 is null and
the second on where keyp3 is not null.

I think I want to:
    create unique index pk on table tbl (keyp1, keyp2);
    create unique index range on table tbl (keyp1, keyp2, keyp3) where keyp3 is not null;

Are these indexes redundant given uniqueness requirement and the type of queries
that will be run against the table?  I don't think a non-unique index over
all three columns be adequate given the uniqueness constraints.

Opinions?

Thanks,

elein
elein@varlena.com



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

Предыдущее
От: "Ploski, Karen L"
Дата:
Сообщение: PostgreSQL and the OCFS2 filesystem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL and the OCFS2 filesystem