Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHD6f-0007Zt-E5 for pgsql-performance@arkaria.postgresql.org; Tue, 21 Nov 2017 18:17:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHD6e-0008Fn-H3 for pgsql-performance@arkaria.postgresql.org; Tue, 21 Nov 2017 18:17:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eHD6e-0008FU-08 for pgsql-performance@lists.postgresql.org; Tue, 21 Nov 2017 18:17:12 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eHD6a-0007V9-GN for pgsql-performance@lists.postgresql.org; Tue, 21 Nov 2017 18:17:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CFE0120D4E; Tue, 21 Nov 2017 13:17:06 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 21 Nov 2017 13:17:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=AEQP+F 1A1MxCTfGSHAowr7Al5+w3smIvyRy8Oiitsvs=; b=jLQ8ZXL2KV/ILFyDrxubN9 anEk+h2YH/kKO4UDsdNdEB3MzgAiBZ2DZX+jvi8k1BmvLZaZJnsyzrwRovdwe/HU JU3svGDCI/gH+0vBQSF4UeFTB30Q3CRxQ0R0JoGsDrjMIO81YFNaL0XPmBQqm7tx Vmx/x476Db+m+LMED70hfoItvzrPb04hJmEN0ZtAPW5SpGmFBVev7o+flgDtmpvc Do2kCqcFodM1NNbRAAe699LhPNQbV3581EH214w9hLIuhJW8ryOPtfj+CcWBMkMf 1+niqwY3u7LHVHiluzV2OP95kG8UfJ0aGcuHFBEss5wmpC1FA8jbZzYZLUNnT4ag == X-ME-Sender: Received: from [IPv6:2607:fb90:f9a:3416:9eb6:ca92:aadf:8159] (unknown [172.58.40.141]) by mail.messagingengine.com (Postfix) with ESMTPA id A680D24CCF; Tue, 21 Nov 2017 13:17:05 -0500 (EST) Date: Tue, 21 Nov 2017 10:16:56 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <1703.1511275766@sss.pgh.pa.us> References: <1511262257.3219920.1179611992.260EC9D9@webmail.messagingengine.com> <1703.1511275766@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Using GROUPING SETS with more than one set disables predicate pushdown? To: pgsql-performance@lists.postgresql.org,Tom Lane ,Zakhar Shapurau CC: pgsql-performance@postgresql.org From: Andres Freund Message-ID: <64AFD0D3-9782-4D3B-9366-5B9EEA4DCB0F@anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On November 21, 2017 6:49:26 AM PST, Tom Lane wr= ote: >Zakhar Shapurau writes: > >Presumably, we could examine the grouping sets to identify column(s) >present in all sets, and then allow the optimization for clauses that >reference only such columns=2E Or maybe I'm misreading the comment >(but then it needs clarification)=2E By memory that sounds about right=2E IIRC we'd some slightly more elaborat= e logic when GS were introduced, but had to take it out as buggy, and it wa= s too late in the development cycle to come up with something better=2E Andres Andres --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E