Re: Question about trigram GIST index - Mailing list pgsql-performance

From Robert DiFalco
Subject Re: Question about trigram GIST index
Date
Msg-id CAAXGW-xDkCfK3v1vVWzbA2D4nGYj46DCxuNtEiqQkuej8oggNg@mail.gmail.com
Whole thread Raw
In response to Re: Question about trigram GIST index  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
Jeff, I'm not seeing that limitation.

On Thu, Dec 18, 2014 at 10:33 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
On Thu, Dec 18, 2014 at 10:00 AM, Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it> wrote:
I'm not sure about the '%' operator, but I'm sure that the GIST index will never be used in the

  SELECT * FROM users WHERE lower(name) LIKE '%john%';

query; it is used for left or right anchored search, such as 'john%' or '%john'.

The point of the gist_trgm_ops operator is specifically to overcome that limitation.

It is pretty awesome.

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Question about trigram GIST index
Next
From: Kevin Grittner
Date:
Subject: Re: Question about trigram GIST index