pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Tkach <dmitry@openratings.com>
To: fcanedo@hotpop.com
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Btree index extension question
Date: Fri, 15 Mar 2002 20:50:56 -0500
Message-ID: <3C92A500.5010804@openratings.com> (raw)
References: <Pine.LNX.4.33.0203160028580.1185-100000@icarus.hades>

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






view thread (12+ messages)  latest in thread

Message-ID: <3C92A500.5010804@openratings.com>
Permalink:  ../3C92A500.5010804@openratings.com/
Also on:    postgresql.org/message-id/3C92A500.5010804@openratings.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dmitry@openratings.com, fcanedo@hotpop.com, pgsql-general@postgresql.org
  Subject: Re: Btree index extension question
  In-Reply-To: <3C92A500.5010804@openratings.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox