Re: ltree + gist index performance degrades significantly over a night - Mailing list pgsql-general

From Bernhard Weisshuhn
Subject Re: ltree + gist index performance degrades significantly over a night
Date
Msg-id 20060227172440.GA4254@weisshuhn.de
Whole thread Raw
In response to Re: ltree + gist index performance degrades significantly over a night  (CG <cgg007@yahoo.com>)
Responses Re: ltree + gist index performance degrades significantly over a night  (CG <cgg007@yahoo.com>)
List pgsql-general
On Mon, Feb 27, 2006 at 09:14:40AM -0800, CG <cgg007@yahoo.com> wrote:

> I could probably get even better performance out of the table, at the cost of a
> significant increase in table and index size, by chopping up the columns into
> smaller chunks.
>
> "Hello World" would yield
>
> 'h.e.l.l.o.w.o.r.l.d'
> 'e.l.l.o.w.o.r.l.d'
> 'l.l.o.w.o.r.l.d'
> 'l.o.w.o.r.l.d'
> 'o.w.o.r.l.d'
> 'w.o.r.l.d'
> 'o.r.l.d'
> 'r.l.d'
>
> and using a wildcard search "search_vector ~ 'o.r.l.*'" would jump right to the
> vectors which start with "o.r.l" ...

But with this approch you'd be fine with a normal varchar_ops btree index
for textfields and searching using "like 'world%'", wouldn't you?
Or is the ltree approch more efficient?

I'm not trying to be smart-assed, it's a naive question, since I'm
looking for an efficient substring search solution in postgresql myself.

regards,
bkw


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Wish: remove ancient constructs from Postgres
Next
From: Emi Lu
Date:
Subject: Re: A question about Vacuum analyze