Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aEgl2-0001uU-GX for pgsql-performance@arkaria.postgresql.org; Thu, 31 Dec 2015 17:11:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aEgl2-0001O6-31 for pgsql-performance@arkaria.postgresql.org; Thu, 31 Dec 2015 17:11:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aEgl1-0001NK-4n for pgsql-performance@postgresql.org; Thu, 31 Dec 2015 17:11:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aEgky-0004JO-1j for pgsql-performance@postgresql.org; Thu, 31 Dec 2015 17:11:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id tBVHBFMH014869; Thu, 31 Dec 2015 12:11:15 -0500 From: Tom Lane To: Jim Nasby cc: Anton Melser , pgsql-performance@postgresql.org Subject: Re: Plan differences In-reply-to: <568557D6.8040905@BlueTreble.com> References: <10594.1451574122@sss.pgh.pa.us> <568557D6.8040905@BlueTreble.com> Comments: In-reply-to Jim Nasby message dated "Thu, 31 Dec 2015 10:29:10 -0600" Date: Thu, 31 Dec 2015 12:11:15 -0500 Message-ID: <14868.1451581875@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Jim Nasby 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