Re: Question about trigram GIST index

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>
Cc: Robert DiFalco <robert(dot)difalco(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Question about trigram GIST index
Date: 2014-12-18 18:33:33
Message-ID: CAMkU=1wuYFGka_+kNZkjQyighQ6ht8n8zJ402PBToSyn2sWtWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Dec 18, 2014 at 10:00 AM, Giuseppe Broccolo <
giuseppe(dot)broccolo(at)2ndquadrant(dot)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
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert DiFalco 2014-12-18 19:33:39 Re: Question about trigram GIST index
Previous Message Robert DiFalco 2014-12-18 18:08:38 Re: Question about trigram GIST index