Re: Universal B-tree

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Universal B-tree
Дата
Msg-id AANLkTimoz_ewPDO1cHTkzG+vMvBCY0YSXxHQi4aQrqo8@mail.gmail.com
обсуждение исходный текст
Ответ на Universal B-tree  (Daniel Oliveira <danielmarquesoliveira@gmail.com>)
Ответы Re: Universal B-tree  (Daniel Oliveira <danielmarquesoliveira@gmail.com>)
Список pgsql-hackers
On Mon, Aug 9, 2010 at 5:31 PM, Daniel Oliveira
<danielmarquesoliveira@gmail.com> wrote:
> I don't need to change B-tree estructure. I just need integrate my encode
> function that transforms multiple keys into one key by bit-interleaving and
> to acess elements given several intervals (range search).

You could build a "expression" index on the function which will build
a regular btree. Then any range clause on a similar expression in the
query would be able to use the index. Postgres is capable of detecting
multiple range clauses that can use one or more indexes and combine
the results.  It might not be perfect for your use case, being a
general purpose tool.

I'm not sure how feasible it would be to implement a special purpose
case that matches your needs. Perhaps a special index type and index
access method similar to gist "tsquery" data type. But that's a lot
more work and a lot more C coding.

-- 
greg


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: patch: to_string, to_array functions
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: knngist - 0.8