Re: Question on Trigram GIST indexes

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "ERR ORR" <rd0002(at)gmail(dot)com>,pgsql-general(at)postgresql(dot)org
Subject: Re: Question on Trigram GIST indexes
Date: 2012-12-22 21:46:11
Message-ID: 20121222214611.144670@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hamann.w 2012-12-22 22:41:28 Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results
Previous Message Adrian Klaver 2012-12-22 18:13:12 Re: rule / trigger definition