Re: Plan differences - Mailing list pgsql-performance

From Tom Lane
Subject Re: Plan differences
Date
Msg-id 14868.1451581875@sss.pgh.pa.us
Whole thread Raw
In response to Re: Plan differences  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-performance
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 12/31/15 9:02 AM, Tom Lane wrote:
>> If you don't want to rebuild the whole database, you can create indexes to
>> support this by declaring them with COLLATE "C", or the older way is to
>> declare them with text_pattern_ops as the index opclass.

> Do you have to do anything special in the query itself for COLLATE "C"
> to work?

No.

> I didn't realize the two methods were equivalent.

Well, they're not equivalent exactly, but indxpath.c knows that either
way produces an index that will work for LIKE.

            regards, tom lane


pgsql-performance by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Plan differences
Next
From: Anton Melser
Date:
Subject: Re: Plan differences