From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rich Shepard <rshepard@appl-ecosys.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Encoding/collation question
Date: Wed, 11 Dec 2019 14:25:17 -0500
Message-ID: <24866.1576092317@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.LNX.2.20.1912111112510.10822@salmo.appl-ecosys.com>
References: <alpine.LNX.2.20.1912111112510.10822@salmo.appl-ecosys.com>
Rich Shepard <rshepard@appl-ecosys.com> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, rshepard@appl-ecosys.com
Subject: Re: Encoding/collation question
In-Reply-To: <24866.1576092317@sss.pgh.pa.us>
References: <alpine.LNX.2.20.1912111112510.10822@salmo.appl-ecosys.com> <24866.1576092317@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