Re: Feature - Index support on an lquery field (from the ltree module) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Feature - Index support on an lquery field (from the ltree module)
Date
Msg-id 55B70C6F.6090506@iki.fi
Whole thread Raw
In response to Feature - Index support on an lquery field (from the ltree module)  (David Belle <david.belle@codewhite.com.au>)
List pgsql-hackers
On 07/28/2015 06:40 AM, David Belle wrote:
> I have a requirement for a project that I am working on and was
> hoping to gain some discussion on the idea of implementing an index
> type for lquery fields (see ltree’s
> http://www.postgresql.org/docs/9.4/static/ltree.html
> <http://www.postgresql.org/docs/9.4/static/ltree.html>)
>
> Currently ltree fields can have GIST/GIN indexes, but you cannot
> create a index for lquery or ltxtquery. In my scope, an index for
> lquery would be enough, although if it wasn’t too difficult it for to
> be expanded for ltxtquery fields, then this could also be
> implemented.

Hmm. My first thought is to extract labels from the query which are 
required for any matches, and put those in the GIN index. When querying, 
find all lqueries that have at least one label in common with the search 
key.

- Heikki




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [DESIGN] ParallelAppend
Next
From: Amit Langote
Date:
Subject: Re: [DESIGN] ParallelAppend