Re: Minmax indexes

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Minmax indexes
Дата
Msg-id 5236D78D.7000701@vmware.com
обсуждение исходный текст
Ответ на Minmax indexes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Minmax indexes  (Chris Travers <chris@2ndquadrant.com>)
Список pgsql-hackers
On 15.09.2013 03:14, Alvaro Herrera wrote:
> + Partial indexes are not supported; since an index is concerned with minimum and
> + maximum values of the involved columns across all the pages in the table, it
> + doesn't make sense to exclude values.  Another way to see "partial" indexes
> + here would be those that only considered some pages in the table instead of all
> + of them; but this would be difficult to implement and manage and, most likely,
> + pointless.

Something like this seems completely sensible to me:

create index i_accounts on accounts using minmax (ts) where valid = true;

The situation where that would be useful is if 'valid' accounts are 
fairly well clustered, but invalid ones are scattered all over the 
table. The minimum and maximum stoed in the index would only concern 
valid accounts.

- Heikki



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

Предыдущее
От: wangshuo@highgo.com.cn
Дата:
Сообщение: Re: Re: [HACKERS] Is it necessaryto rewrite table while increasing the scale of datatype numeric?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: patch: add MAP_HUGETLB to mmap() where supported (WIP)