pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: tank.zhang <6220104@qq.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgresql Sort cost Poor performance?
Date: Mon, 01 Apr 2019 11:20:48 +0100
Message-ID: <87d0m6uj5u.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <1554111914781-0.post@n3.nabble.com>
References: <1554111914781-0.post@n3.nabble.com>

>>>>> "tank" == tank zhang <6220104@qq.com> writes:

 tank>  smtoc        | character varying(50)       |           |          | 
 tank>          Sort Key: smtoc

What is the output of  SHOW lc_collate;

One of the most common reasons for slow sorting is that you're sorting a
text/varchar field in a locale other than C. The slowdown for using
other locales varies according to the data, the locale, and the
operating system, but 8-20x slowdowns are very common, 50-100x slowdowns
are not unusual, and there have been reports of even worse cases with
unusual script combinations.

-- 
Andrew (irc:RhodiumToad)





view thread (9+ messages)  latest in thread

Message-ID: <87d0m6uj5u.fsf@news-spur.riddles.org.uk>
Permalink:  ../87d0m6uj5u.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87d0m6uj5u.fsf@news-spur.riddles.org.uk

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, 6220104@qq.com
  Subject: Re: Postgresql Sort cost Poor performance?
  In-Reply-To: <87d0m6uj5u.fsf@news-spur.riddles.org.uk>

* 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