Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YHN34-00083e-V0 for pgsql-performance@arkaria.postgresql.org; Sat, 31 Jan 2015 01:40:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YHN34-00039T-AO for pgsql-performance@arkaria.postgresql.org; Sat, 31 Jan 2015 01:40:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YHN33-00039L-3u for pgsql-performance@postgresql.org; Sat, 31 Jan 2015 01:40:33 +0000 Received: from mail-bn1bon0653.outbound.protection.outlook.com ([2a01:111:f400:fc10::1:653] helo=na01-bn1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YHN2z-0001dA-2w for pgsql-performance@postgresql.org; Sat, 31 Jan 2015 01:40:31 +0000 Received: from decina.local (24.55.12.91) by CY1PR11MB0345.namprd11.prod.outlook.com (25.161.165.13) with Microsoft SMTP Server (TLS) id 15.1.65.19; Sat, 31 Jan 2015 01:40:22 +0000 Message-ID: <54CC327D.6000202@BlueTreble.com> Date: Fri, 30 Jan 2015 19:40:13 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pavel Stehule , Joe Van Dyk CC: "pgsql-performance@postgresql.org" Subject: Re: Query performance References: In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [24.55.12.91] X-ClientProxiedBy: DM2PR10CA0081.namprd10.prod.outlook.com (10.141.241.49) To CY1PR11MB0345.namprd11.prod.outlook.com (25.161.165.13) Authentication-Results: postgresql.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR11MB0345; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:CY1PR11MB0345; X-Forefront-PRVS: 0473A03F3F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(479174004)(377454003)(51704005)(24454002)(50466002)(23676002)(62966003)(77156002)(47776003)(59896002)(76176999)(65806001)(50986999)(54356999)(2950100001)(86362001)(46102003)(87266999)(15975445007)(64126003)(65816999)(93886004)(42186005)(33656002)(36756003)(65956001)(66066001)(92566002)(83506001)(122386002)(87976001)(19580395003)(40100003)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR11MB0345; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:CY1PR11MB0345; X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2015 01:40:22.0730 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR11MB0345 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 On 1/25/15 2:03 AM, Pavel Stehule wrote: > It might not always be an integer, just happens to be so here. > Should I try text instead? I don't have to have the case-insensitive > matching. > > > text can be better bytea would be even better yet, because that will always be a straight binary comparison. text will worry about conversion and what not (though, perhaps there's a way to force that to use C or SQL instead of something like UTF8, short of changing the encoding of the whole database). -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance