Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3pRI-0007f9-I7 for pgsql-performance@arkaria.postgresql.org; Mon, 07 Nov 2016 19:18:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c3pRH-0001MD-Md for pgsql-performance@arkaria.postgresql.org; Mon, 07 Nov 2016 19:18: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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c3pPd-0007rq-D9 for pgsql-performance@postgresql.org; Mon, 07 Nov 2016 19:16:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c3pPa-0000VX-MW for pgsql-performance@postgresql.org; Mon, 07 Nov 2016 19:16:56 +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 uA7JGnRV003810; Mon, 7 Nov 2016 14:16:49 -0500 From: Tom Lane To: Adam Brusselback cc: pgsql-performance@postgresql.org Subject: Re: Query much slower after upgrade to 9.6.1 In-reply-to: References: Comments: In-reply-to Adam Brusselback message dated "Mon, 07 Nov 2016 13:05:40 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3808.1478546209.1@sss.pgh.pa.us> Date: Mon, 07 Nov 2016 14:16:49 -0500 Message-ID: <3809.1478546209@sss.pgh.pa.us> X-Pg-Spam-Score: -4.7 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Adam Brusselback writes: > As suggested in the Postgres slack channel by lukasfittl, I disabled > hashagg on my old server, and ran the query again. That changed one piece > to a groupagg (like was used on the new server) and the performance was > similar to the 9.6.1 box. If the problem is "new server won't use hashagg", I'd wonder whether the work_mem setting is the same, or whether maybe you need to bump it up some (the planner's estimate of how big the hashtable would be might have changed a bit). regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance