Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DB2831337B8F for ; Thu, 11 Nov 2010 22:32:12 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 89605-09 for ; Fri, 12 Nov 2010 02:32:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) by mail.postgresql.org (Postfix) with ESMTP id 713C11337B82 for ; Thu, 11 Nov 2010 22:32:05 -0400 (AST) Received: by gwb20 with SMTP id 20so293413gwb.19 for ; Thu, 11 Nov 2010 18:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:content-language:x-cr-hashedpuzzle :x-cr-puzzleid; bh=fKGNEiF1yA5zkx2hWHKMsLwbHAzpHsM+8zExuRP6Y0E=; b=FBiOppfwotEjheqtOFMVJwuCt5GakyGUrs9nFgr//2anIXzRayQRt07Q0dFivuMRHv 2eIEpMXf7iSLQmVRRiEqeKkSUYrtKitblpgTDAZCp9d+wWK2wDXwHXJ408cCQB33bF9h wx08O8jypPB9PQzMQGqwQMfUDBYfQ3a6sUbwg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language :x-cr-hashedpuzzle:x-cr-puzzleid; b=kVTowT2tW7u86mo+97ytfZghHySCYV4cCjQkZjkvOSN2IZRo/yY2LM8zONVk0EEnGr tZJ7UcTiE7+BDfnG1BjNjCq0KOsFf9qO0fdnbupaGEIY9v9USXhMZrG/M1ppHLt1gx4z GN/UlByWMXBZOXMFZMgaNqn70Pe6KkCJM6dOw= Received: by 10.150.181.21 with SMTP id d21mr2993767ybf.25.1289529125123; Thu, 11 Nov 2010 18:32:05 -0800 (PST) Received: from Duality (97-118-163-144.hlrn.qwest.net [97.118.163.144]) by mx.google.com with ESMTPS id q14sm522937ybk.7.2010.11.11.18.32.03 (version=SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 18:32:03 -0800 (PST) From: "mark" To: Subject: locales and encodings Oh MY! Date: Thu, 11 Nov 2010 19:31:51 -0700 Message-ID: <000001cb8211$c4c91b00$4e5b5100$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcuCEcJksL5fekTtQ3GNTADJIAhYFw== Content-Language: en-us x-cr-hashedpuzzle: AXtN BVtO BY4f BsyW CYki Cjk1 DCcI D+1d GPc9 GUj/ GbiN H9yz IaWH JQAx JowB KRO+; 1; cABnAHMAcQBsAC0AYQBkAG0AaQBuAEAAcABvAHMAdABnAHIAZQBzAHEAbAAuAG8AcgBnAA==; Sosha1_v1; 7; {EC1800EC-294D-4AA2-A0E6-D580E39D46D6}; ZAB2AGwAaABuAHQAcgBAAGcAbQBhAGkAbAAuAGMAbwBtAA==; Fri, 12 Nov 2010 02:31:49 GMT; bABvAGMAYQBsAGUAcwAgAGEAbgBkACAAZQBuAGMAbwBkAGkAbgBnAHMAIABPAGgAIABNAFkAIQA= x-cr-puzzleid: {EC1800EC-294D-4AA2-A0E6-D580E39D46D6} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/91 X-Sequence-Number: 36057 Hi all, So today while I investigating some slow queries I found out that some time ago some of our databases (due, innocently I suspect, to upgrades or hardware migrations) are now not using C as lc_ctype. And why some 'things' got a lot slower... To correct this problem it seems like I am going to have to do a dump, intidb, then restore. (or add some new indexes and eat the extra overhead). Unless someone knows something I don't about changing ctype and collation with some sleight of hand (if you do I am very interested) I have listed what I think I will be doing with regards to initdb. if anyone sees problems with the following mixture during my dump -> init-> restore I would be most keen in hearing about it. initdb /path/to/data/dir --lc_ctype=C --lc_collation=C --lc_message=en_US.UTF8 --lc_monetary=en_US.UTF8 --lc_numeric=en_US.UTF8 --lc_time=en_US.UTF8 -E UTF8 Thank you, Mark