AW: [HACKERS] partial index

Поиск
Список
Период
Сортировка
От Andreas Zeugswetter
Тема AW: [HACKERS] partial index
Дата
Msg-id 01BDC5E0.B2CF5400@zeugswettera.user.lan.at
обсуждение исходный текст
Список pgsql-hackers
Bruce wrote:
>What is a partial index?  I have never known.

A partial index is one that only indexes a subset of a table (e.g. restricted by a where clause).

This can be useful in many cases, one typical case is where all rows that are not null
in the index fields are to be indexed:
create index people_idx on people (childname) where childname is not null;

Note that I just made up the syntax (or is it postgresql syntax?). Some code for it lurks around.

Informix uses another syntax with a complete select statement, so you can also index a join:

CREATE GK INDEX gki
(SELECT A.col1, A.col2 FROM A, B, C
WHERE A.col1 = B.col1 AND B.col1 = C.col1)


Andreas



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

Предыдущее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Rule system
Следующее
От: Andreas Zeugswetter
Дата:
Сообщение: AW: [HACKERS] Rule system