Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if7bx-0004Qh-R5 for pgsql-general@arkaria.postgresql.org; Wed, 11 Dec 2019 19:25:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1if7bw-0005Bt-C3 for pgsql-general@arkaria.postgresql.org; Wed, 11 Dec 2019 19:25: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_SHA1:256) (Exim 4.89) (envelope-from ) id 1if7bw-0005Bm-2C for pgsql-general@lists.postgresql.org; Wed, 11 Dec 2019 19:25:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if7bt-0005X2-Gj for pgsql-general@lists.postgresql.org; Wed, 11 Dec 2019 19:25:23 +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 xBBJPHdL024867; Wed, 11 Dec 2019 14:25:17 -0500 From: Tom Lane To: Rich Shepard cc: pgsql-general@lists.postgresql.org Subject: Re: Encoding/collation question In-reply-to: References: Comments: In-reply-to Rich Shepard message dated "Wed, 11 Dec 2019 11:16:05 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24865.1576092317.1@sss.pgh.pa.us> Date: Wed, 11 Dec 2019 14:25:17 -0500 Message-ID: <24866.1576092317@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rich Shepard writes: > My older databases have LATIN1 encoding and C collation; the newer ones have > UTF8 encoding and en_US.UTF-8 collation. A web search taught me that I can > change each old database by dumping it and restoring it with the desired > encoding and collation types. My question is whether the older types make > any difference in a single-user environment. String comparisons in non-C collations tend to be a lot slower than they are in C collation. Whether this makes a noticeable difference to you depends on your workload, but certainly we've seen performance gripes that trace to that. If your data doesn't require the larger character set of UTF8, then using LATIN-any is going to offer some space savings (for non-ASCII characters) plus minor performance benefits due to the lack of variable-width characters. This is less significant than the collation issue, though, for most people. regards, tom lane