Re: Universal B-tree

From: Daniel Oliveira <danielmarquesoliveira(at)gmail(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Universal B-tree
Date: 2010-08-10 02:46:14
Message-ID: AANLkTikYj-6BS5VxC_QqShbj29gHMrzG2reBFdPVk7zu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There is a way to acess a index inside a c function without using a sql
statement ?

Best regards,

Daniel Oliveira

2010/8/9 Daniel Oliveira <danielmarquesoliveira(at)gmail(dot)com>

> For research purpose, I think that expression index is a good idea. I just
> want to do a proof of concept.
>
> The other issue is that my algorithm break a z-order interval into several
> intervals that represents the query box. How should I create it without
> creating any overhead?
>
> Best regards,
>
> daniel
>
> 2010/8/9 Greg Stark <gsstark(at)mit(dot)edu>
>
> On Mon, Aug 9, 2010 at 5:31 PM, Daniel Oliveira
>> <danielmarquesoliveira(at)gmail(dot)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
>>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boxuan Zhai 2010-08-10 03:03:26 Re: MERGE Specification
Previous Message Robert Haas 2010-08-10 01:54:15 1-byte id for SharedInvalidationMessages