Re: Question on Trigram GIST indexes - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Question on Trigram GIST indexes
Date
Msg-id 20121222214611.144670@gmx.com
Whole thread Raw
In response to Question on Trigram GIST indexes  (ERR ORR <rd0002@gmail.com>)
List pgsql-general
ERR ORR wrote:

> Specifically, I was trying to replicate what is done in this blog post:
> http://www.postgresonline.com/journal/archives/212-PostgreSQL-9.1-Trigrams-teaching-LIKE-and-ILIKE-new-tricks.html

> Queries which use "WHERE "TST_PAYLOAD" LIKE 'SEAT%'" go to the btree index
> as it should.
> Queries which use "WHERE "TST_PAYLOAD" LIKE '%EAT%'" *should* use the GIST
> index but do a full table scan instead.
> (I am looking for names like 'SEATTLE')

Have you run VACUUM ANALYZE with the index and data in place (as
shown in the blog post?

Another conspicuous difference is your explicit use of a COLLATE
clause in the index declaration.

-Kevin


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: rule / trigger definition
Next
From: hamann.w@t-online.de
Date:
Subject: Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results