Re: GiST, R-TREE, Lexicographic index ?

From: arnaud(dot)mlist1(at)free(dot)fr
To: Peter Gibbs <peter(at)emkel(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: GiST, R-TREE, Lexicographic index ?
Date: 2002-05-17 07:25:26
Message-ID: 1021620326.3ce4b066674ad@imp.free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> The only method I have been able to find that will use the index is to
> provide both upper and lower limits on the key.
>
> select * from twords
> where words <= 'saxophones'
> and words >= 's'
> and position(words in 'saxophones') = 1;

That's an interesting progress, but it still doesn't satisfy me (still too slow
in most cases). I've been looking to R-TREEs and GiST indexes but I can't
figure how I could use them yet...

In fact, thet kind of index I would need is exactly what a GiST provides since
it references things between two limits. This allows to find fastly if boxes
overlap and things like this.
In my case, I would have to define an operator that would return true if left
operand is exactly the beginning of the right one and false otherwise, and then
find a way to use a GiST or R-TREE with that relation...
Maybe I'm far away from the solution but I don't understand yet the
implementations of GiSTs and R-TREE and how to use them for my special problem.

Do I have any chance to solve my problem using that kind of indexes ?

Thanks for your replies though !
Arnaud

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Niclas Gustafsson 2002-05-17 10:54:00 Indices for both where and order by.
Previous Message Mathieu Arnold 2002-05-17 06:59:48 Re: Is there eny e-mail server that uses postgreSQL