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 1goYQ8-0005oW-TD for pgsql-performance@arkaria.postgresql.org; Tue, 29 Jan 2019 18:47:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goYQ7-0002PL-Mx for pgsql-performance@arkaria.postgresql.org; Tue, 29 Jan 2019 18:47:39 +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 1goYQ7-0002Gf-CQ for pgsql-performance@lists.postgresql.org; Tue, 29 Jan 2019 18:47:39 +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 1goYQ5-0003eh-0Z for pgsql-performance@lists.postgresql.org; Tue, 29 Jan 2019 18:47:38 +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 x0TIlVrE014005; Tue, 29 Jan 2019 13:47:31 -0500 From: Tom Lane To: Bob Jolliffe cc: pgsql-performance@lists.postgresql.org Subject: Re: How can sort performance be so different In-reply-to: References: Comments: In-reply-to Bob Jolliffe message dated "Tue, 29 Jan 2019 18:29:25 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14003.1548787651.1@sss.pgh.pa.us> Date: Tue, 29 Jan 2019 13:47:31 -0500 Message-ID: <14004.1548787651@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bob Jolliffe writes: > I wonder what can cause such a massive discrepancy in the sort time. Are you using the same locale (LC_COLLATE) setting on both machines? Some locales sort way slower than C locale does. That's not enough to explain a 1000X discrepancy --- I concur with the other opinions that there's something wrong with your VPS --- but it might account for something like 10X of it. regards, tom lane