Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUL7T-00074X-Oh for pgsql-committers@arkaria.postgresql.org; Thu, 19 Jan 2017 22:23:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUL7S-00005p-Lv for pgsql-committers@arkaria.postgresql.org; Thu, 19 Jan 2017 22:23:46 +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 1cUL7F-0008IR-0B for pgsql-committers@postgresql.org; Thu, 19 Jan 2017 22:23:33 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cUL7B-00077y-B6 for pgsql-committers@postgresql.org; Thu, 19 Jan 2017 22:23:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 12E2C20B37; Thu, 19 Jan 2017 17:23:28 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Thu, 19 Jan 2017 17:23:28 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=xWt77A/H1/SlBY 5rVkRw2Hh2xPU=; b=hcU1mLb6jsRhKFrhhukJKoLQ3kZ1AW2Pq3rZpSW2Hg60HI iI2VIdw7cV7stYeZ7lHTRypscc+C+8pWzzTdDnis95bC3Iugv0ywtpDm605cKmN4 afdU3SM7hY/B9CzlUNDn+YTC+w/tWARufoYhZCp9jv8Sbh7AXj5EUx8yfiCJM= X-ME-Sender: X-Sasl-enc: 2/3Uio/5grQo5A3gTlLcUAHMGNivjRVBSR1TOmuuhFhN 1484864607 Received: from intern.anarazel.de (unknown [199.87.86.247]) by mail.messagingengine.com (Postfix) with ESMTPA id CC0B57E2B3; Thu, 19 Jan 2017 17:23:27 -0500 (EST) Date: Thu, 19 Jan 2017 14:23:26 -0800 From: Andres Freund To: Tom Lane Cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Adapt python regression tests to 69f4b9c85f16. Message-ID: <20170119222326.cvutdjbampywitt6@alap3.anarazel.de> References: <18876.1484786092@sss.pgh.pa.us> <20170119003933.vkgng32dfw56gw3m@alap3.anarazel.de> <21830.1484790567@sss.pgh.pa.us> <22891.1484791792@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22891.1484791792@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Hi, On 2017-01-18 21:09:52 -0500, Tom Lane wrote: > I wrote: > > If you don't want an ORDER BY, maybe turn off enable_hashagg for > > these queries? But you'll get the same plan either way. > > Or not ... I forgot it has a better model of the rowcount changes now: > regression=# set enable_hashagg TO 0; > SET > regression=# explain SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa, unnest('{1,1,3}'::int[]); > QUERY PLAN > ----------------------------------------------------------------------- > GroupAggregate (cost=39.94..45.99 rows=4 width=52) > Group Key: dataa, (unnest('{1,1,3}'::integer[])) > -> Sort (cost=39.94..40.94 rows=400 width=40) > Sort Key: dataa, (unnest('{1,1,3}'::integer[])) > -> ProjectSet (cost=0.00..22.66 rows=400 width=40) > -> Seq Scan on few (cost=0.00..20.62 rows=4 width=36) > Filter: (id = 1) > (7 rows) > So which plan would you rather test? That looks good to me. Will add. Thanks, Andres -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers