Re: Index usage for tstzrange?

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Index usage for tstzrange?
Дата
Msg-id 514CE0DA.5040109@vmware.com
обсуждение исходный текст
Ответ на Re: Index usage for tstzrange?  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Index usage for tstzrange?  (Josh Berkus <josh@agliodbs.com>)
Re: Index usage for tstzrange?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On 22.03.2013 02:05, Josh Berkus wrote:
>> Well, no.<@ is not a btree-indexable operator.
>
> Yes, but it's equivalent to ( ( a>= b1 or b1 is null ) and ( a<  b2 or
> b2 is null ) ), which *is* btree-indexable and can use an index.  So it
> seems like the kind of optimization we could eventually make.

Yeah. The sort order of <@ is the same as regular b-tree, so it should
be possible. In fact, nothing stops you from creating the suitable
operator and b-tree support functions. See attached patch for int4, but
the same should work for timestamptz.

We should do this automatically. Or am I missing something?

- Heikki

Вложения

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

Предыдущее
От: Cindy Makarowsky
Дата:
Сообщение: Re: Performance of query
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Index usage for tstzrange?