Re: query with pg_trgm sometimes very slow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 2, 2015 at 4:29 PM, Jeff Janes <jeff.janes@xxxxxxxxx> wrote:
> On Wed, Sep 2, 2015 at 7:00 AM, Volker Böhm <volker@xxxxxxxxx> wrote:
>>
>>
>>
>> CREATE INDEX trgm_adresse ON adressen.adresse USING gist
>> (normalize_string((btrim((((((((normalize_string((((COALESCE((vorname)::text,
>> ''::text) || ' '::text) ||   (name1)::text))::character varying,
>> (-1)))::text || ' '::text) || (normalize_string((COALESCE((strasse)::text,
>> ''::text))::character varying, (-2)))::text) || ' '::text) || (plz)::text)
>> || ' '::text) || (normalize_string((COALESCE((ort)::text,
>> ''::text))::character varying, (-3)))::text)))::character varying)
>> gist_trgm_ops);
>
>
>
> You might have better luck with gin_trgm_ops than gist_trgm_ops.  Have you
> tried that?


I just had the exact same problem, and indeed gin fares much better.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux