Обсуждение: Indexing array columns.

Поиск
Список
Период
Сортировка

Indexing array columns.

От
Joshua Marsh
Дата:
I've been searching the manual looking for information about the effects of indexing an array column but haven't found any information as of yet. 

Does anyone have any information on how the indexes work for arrayed columns? 

Does/Can the index track each element in the array, or does it track only the array as a whole? 

How can I increase the speed of a query like: SELECT * FROM table WHERE 123 = ANY(array_of_ints); ?

Thanks,

Josh

Re: Indexing array columns.

От
Joe Conway
Дата:
Joshua Marsh wrote:
> Does/Can the index track each element in the array, or does it track
> only the array as a whole?

Built in index support works on the array as a whole, not the individual
elements.

> How can I increase the speed of a query like: SELECT * FROM table WHERE
> 123 = ANY(array_of_ints); ?

See contrib/intarray.

Joe