pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Nasby <Jim.Nasby@BlueTreble.com>
Cc: Anton Melser <melser.anton@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Plan differences
Date: Thu, 31 Dec 2015 12:11:15 -0500
Message-ID: <14868.1451581875@sss.pgh.pa.us> (raw)
In-Reply-To: <568557D6.8040905@BlueTreble.com>
References: <CAKywjPoJS4hQiLTukMDUCvmaA_aJp-W11tvnu-=wnwaL0vuqQA@mail.gmail.com>
	<10594.1451574122@sss.pgh.pa.us>
	<568557D6.8040905@BlueTreble.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


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



view thread (10+ messages)  latest in thread

Message-ID: <14868.1451581875@sss.pgh.pa.us>
Permalink:  ../14868.1451581875@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14868.1451581875@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Jim.Nasby@BlueTreble.com, melser.anton@gmail.com
  Subject: Re: Plan differences
  In-Reply-To: <14868.1451581875@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox