Re: ltree and ordering - what index? - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: ltree and ordering - what index?
Date
Msg-id 20050920224934.GA7630@pervasive.com
Whole thread Raw
In response to Re: ltree and ordering - what index?  (hubert depesz lubaczewski <depesz@gmail.com>)
List pgsql-general
On Mon, Sep 19, 2005 at 07:23:54AM +0200, hubert depesz lubaczewski wrote:
> On 9/18/05, Jim C. Nasby <jnasby@pervasive.com> wrote:
> >
> > ltree is part of contrib, right?
>
>
>
> yes.
>
> You probably need to define a functional index of some kind. How are you
> > querying now? IIRC you'll be doing something like region IN (ltree)?
> >
>
> i didn't thought about functional indices, but this might be a solution.
> have to think about it for a while
> searching through ltree's is done using specific operators (>@).

Yes, which is something I don't think the indexing code can deal with.

IIRC you're looking for a way to index something that's in a specific
place in the ltree, so you'd want to index that actual function
expression.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Question about a query plan
Next
From: "Jim C. Nasby"
Date:
Subject: Re: running vacuum in scripts