Re: Btree index extension question - Mailing list pgsql-general

From Dmitry Tkach
Subject Re: Btree index extension question
Date
Msg-id 3C92A500.5010804@openratings.com
Whole thread Raw
In response to Re: Btree index extension question  (<fcanedo@hotpop.com>)
List pgsql-general
fcanedo@hotpop.com wrote:

>
>
>I understand this:
>1. You want to use a btree index because presumably it's faster than a
>normal index.
>
Ahhh.. What do you mean by 'normal index'?
I have two reasons to use btree:
- It is simpler to implement;
- It can be used in combination with other columns (these 15 boolean
flags is not the only stuff I need to search by, so, I am going to have
to run queries like '... where flags & 33 = 33 and foo=bar'' - to do
that, I would need an index on (flags 'bit_ops', foo), where bit_ops is
my special set of operations I am looking to define). If I am not using
btree for the flags, I would then have to define the whole indexing
strategy for all my columns, and I am really hoping to be able to avoid
having to do that.

>
>2. A btree index is a binary tree index that uses the order of values to
>find an answer quickly.
>
Yep.

>
>3. In your case for instance: a value of 10 should produce a resultset
>with bitstrings of 10, 11, 14, 26, ...
>
Yep.

>
>Wouldn't know how to get this to work though! :(
>

Yeah... me neither :-(
I am about to give up on this (hate to do that!)...

I was trying to make use of a GiST index now, but having some problems
with that too :-(
Could you please look at the next message I am about to post in a few
minutes (about debugging C functions)? Perhaps, you would have some
helpful ideas there?

Thanks!


Dima




pgsql-general by date:

Previous
From:
Date:
Subject: Re: Btree index extension question
Next
From: Dmitry Tkach
Date:
Subject: Debugging C functions...