Re: substring index what is better way to query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tieson Molly <tvmaly(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: substring index what is better way to query
Date: 2017-06-20 14:45:47
Message-ID: 3969.1497969947@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tieson Molly <tvmaly(at)gmail(dot)com> writes:
> is there a different construct than the Similar To that would work?

> I know for certain that the first few characters could be different due to
> the nature of geohashes. So I may not be able to optimize the prefix
> aspect in some cases.

Depending on what patterns you're looking for, it's possible that a
trigram index (contrib/pg_trgm) would work better.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sumeet Shukla 2017-06-23 00:40:35 Dataset is fetched from cache but still takes same time to fetch records as first run
Previous Message Tieson Molly 2017-06-20 14:40:43 Re: substring index what is better way to query