Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btmVT-0000CK-1i for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Oct 2016 02:09:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1btmVS-0005X4-F7 for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Oct 2016 02:09:26 +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 1btmU5-0003sl-1D for pgsql-hackers@postgresql.org; Tue, 11 Oct 2016 02:08:01 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1btmTy-00060H-D6 for pgsql-hackers@postgresql.org; Tue, 11 Oct 2016 02:08:00 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B5C5A2075D; Mon, 10 Oct 2016 22:07:52 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Mon, 10 Oct 2016 22:07:52 -0400 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-sasl-enc :x-sasl-enc; s=smtpout; bh=LjykpQW7XlYm0okEk08IuMAJH6o=; b=huPjb 7AUhXDS9OYjyLbfrYbSR4Chf4AqpEj4XP8y8GFtvq9HonFeRwSGEARbFz4+8BtUY fvdWtPwQKCy9LGVifhGWVgpZ/RqKdGn26yj4iuAtwGU83mhYPugy5jvArgZiHDhz YdxCzsc81y0voon9QARlEEpf4f7EybcuHX5/Js= X-Sasl-enc: ypXxigFw4AKhgM/bbkc09HiiZZnuUXbdh9zsuRnHajI8 1476151672 Received: from intern.anarazel.de (somacentral1.static.monkeybrains.net [162.217.75.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 73231F29CD; Mon, 10 Oct 2016 22:07:52 -0400 (EDT) Date: Mon, 10 Oct 2016 19:07:51 -0700 From: Andres Freund To: Tomas Vondra Cc: pgsql-hackers@postgresql.org Subject: Re: Macro customizable hashtable / bitmapscan & aggregation perf Message-ID: <20161011020751.o2ozug266i5vx7pt@alap3.anarazel.de> References: <20160727004333.r3e2k2y6fvk2ntup@alap3.anarazel.de> <20161001004454.4wkqbmu67spvc3ak@alap3.anarazel.de> <41a178d4-a599-60e6-1657-e2489508858a@2ndquadrant.com> <20161001195956.u657cbvya7thzkr6@alap3.anarazel.de> <0b71d15b-89ef-bd4f-d653-0a118b550601@2ndquadrant.com> <20161002001758.GA14611@awork2> <20161009233803.6zjackpbz2v2s4sw@alap3.anarazel.de> <64bb428d-8e05-9130-5627-fac7e85a68aa@2ndquadrant.com> <20161011004622.5kkvlwghm4yvg4id@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161011004622.5kkvlwghm4yvg4id@alap3.anarazel.de> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2016-10-10 17:46:22 -0700, Andres Freund wrote: > > TPC-DS (tpcds.ods) > > ------------------ > > > > In this case, I'd say the results are less convincing. There are quite a few > > queries that got slower by ~10%, which is well above - for example queries > > 22 and 67. There are of course queries that got ~10% faster, and in total > > the patched version executed more queries (so overall the result is slightly > > positive, but not significantly). > > That's interesting. I wonder whether that's plan changes just due to the > changing memory estimates, or what's causing that. I'll look into it. Hm. Based on an initial look those queries aren't planned with any of the affected codepaths. Could this primarily be a question of randomness? Would it perhaps make sense to run the tests in a comparable order? Looking at tpcds.py and the output files, it seems that the query order differes between the runs, that can easily explain bigger difference than the above. For me a scale=1 run creates a database of approximately 4.5GB, thus with shared_buffers=1GB execution order is likely to have a significant performance impact. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers