Re: Behavior of a pg_trgm index for 2 (or < 3) character LIKE queries

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Behavior of a pg_trgm index for 2 (or < 3) character LIKE queries
Date: 2013-05-30 15:00:51
Message-ID: CA+HiwqFv0efdd_PA4cmS3E7_f18mdB0vPKkB=joF_y4qN+dy3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 30, 2013 at 11:47 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, May 29, 2013 at 10:51 PM, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
>> So, it appears, for search strings consisting of 2 (or < 3)
>> characters, trigrams can not be utilized. No?
>
> I think that's right. "trigram" means a sequence of three characters,
> and what's stored in the indexes are three-character sequences from
> the original text.
>

Was there any improvement to pg_trgm in recent past that could make it
better for partial matching (the case in question I suppose) or is
partial-matching a different thing altogether?

--
Amit Langote

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-05-30 15:11:12 Re: pg_dump with postgis extension dumps rules separately
Previous Message Robert Haas 2013-05-30 14:47:42 Re: Behavior of a pg_trgm index for 2 (or < 3) character LIKE queries