Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTjtf-0006wY-4p for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2022 13:06:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTjtc-0005RP-Jo for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2022 13:06:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTjtb-0005R8-Nr for pgsql-hackers@lists.postgresql.org; Thu, 01 Sep 2022 13:06:12 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oTjtY-0007y2-6C for pgsql-hackers@lists.postgresql.org; Thu, 01 Sep 2022 13:06:11 +0000 Received: by mail-ed1-x531.google.com with SMTP id a36so18671747edf.5 for ; Thu, 01 Sep 2022 06:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=8gkm8HBgq028f5mKyCNqc4qi+oHlcVz56T2PkKZigZQ=; b=dyDQQs/MbIAvdQGQEFwWyeg8AemugqsYg+fSYS35GXZ0b2PqWCAHpEgNTiXcOkKRH9 Bwa2nhoEHSGGzv0ETVgx+pVnUGfP0Btdr1ByHiy532Z7FeOJNGX5vf+lW+CndG7nbeBb N9Wk6Ddb3DnGy9F5NzixovRbZuJ6ZBpo2P2gl4DJ2sznA9esfgCJ62Mj8gy+lxPSxobb y9Do638eSs2e0nbaYSl4VreY6E1cRu1cVwr9WqRZUaWUsCJ75l6HMJ/qjbi7MilRt3wc mv69Jefe877uXvKrf12Nr5DpEbHz/FoD4Ol3CdHFxBUD2lyjnTZ+N7/Q8/QGXAt1uRQj y6eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=8gkm8HBgq028f5mKyCNqc4qi+oHlcVz56T2PkKZigZQ=; b=Zma/wYl3vjF0nCDRZLKKjFoShLwy2ODZBo7hbd7/8nsnp2rYY6Zh0vz3GTPs4LLEyi YRY5G/FWwChmJZ/vW/b2Tz+PoktKHYmjynCg3qAODnaI1hz+/Cx7ZC5vJcr+WJYxarvL YOnLEtk3YDs3cthNeL0ZzK7HfMCUubMpaMcpB4t+ON11mHz/4jrgzWskjGMFGDknzkqL ZAoAPmwM7a/DzUOfcDzO/WtWHurI6kim9w3wtBn2Y7gmMdtoPGSfvBzByyDmZoy2rSFv 7DKa91nrfF3pwHlYZg+qG0HEV5u47D01xl0I89M5JonkWwfUcvbOkUtpnVOGSHGk1h/O oKiw== X-Gm-Message-State: ACgBeo0RpupnUqISjef77pl7LS/9lpicECvTLzVOSIflP5I9TkxlGhCO qF0XwjIlZeaXYq/5grdML1LUoy8DyFi839z2WihU8AzyX0MHxbUEynXEANaaAcsLFOj2ruGPRuZ g33Gj7B3nYPy/norbXghbKPLIPYJToNcBSmujG2bIBijlquBSKmKDpc2+5x5BQ/YON5J5uv+PTx SC2tu4LVRKDMZ+B4iA9W54OHdqMv5iWXjCs4BrGpOJfie2nUepP2l0 X-Google-Smtp-Source: AA6agR4pxyhXTL3EGTl1+6OME4r8KSj2m6LVjtRS6fWfJ2q31i0J7ROADkL5igPCsYfLTxuStyJnIQ== X-Received: by 2002:a05:6402:51cf:b0:447:2c7d:4dc3 with SMTP id r15-20020a05640251cf00b004472c7d4dc3mr28573609edd.369.1662037566756; Thu, 01 Sep 2022 06:06:06 -0700 (PDT) Received: from [10.137.0.17] (static-84-42-175-93.bb.vodafone.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id bx26-20020a0564020b5a00b00445a06b6920sm1346489edb.17.2022.09.01.06.06.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 06:06:06 -0700 (PDT) Message-ID: <217ab546-4c78-9364-9282-a6dcefa066ea@enterprisedb.com> Date: Thu, 1 Sep 2022 15:06:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: POC: GROUP BY optimization Content-Language: en-US To: "Jonathan S. Katz" , David Rowley Cc: Michael Paquier , Zhihong Yu , "Andrey V. Lepikhov" , Teodor Sigaev , Tomas Vondra , PostgreSQL Developers References: <721b3ff9-f214-f5d4-86c7-bae515bbec18@enterprisedb.com> <7bea462e-8c3e-0f8c-c7d5-f4daa12f3baf@postgrespro.ru> <9af89543-3d17-4c98-59de-1daa5bceeb06@enterprisedb.com> <9408e450-60c6-6fbc-d5c4-467bb0abfe67@postgrespro.ru> <44472925-f6c6-e8de-6f72-0451458532c4@enterprisedb.com> <7a80a207-5e8e-b80c-476c-2d290b0526e9@enterprisedb.com> <65941e87-86c1-c09c-8ad5-8e102aebe8ee@enterprisedb.com> <683635b8-381b-5b08-6069-d6a45de19a12@enterprisedb.com> <77b83b6d-bdb4-614d-4e7d-235ee72e2599@postgresql.org> From: Tomas Vondra In-Reply-To: <77b83b6d-bdb4-614d-4e7d-235ee72e2599@postgresql.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/30/22 15:15, Jonathan S. Katz wrote: > On 8/18/22 3:29 AM, Tomas Vondra wrote: >> >> >> On 8/18/22 03:32, David Rowley wrote: > >>> Here are a couple of patches to demo the idea. >>> >> >> Yeah, that's an option too. I should have mentioned it along with the >> cpu_operator_cost. >> >> BTW would you mind taking a look at the costing? I think it's fine, but >> it would be good if someone not involved in the patch takes a look. > > With RMT hat on, just a friendly reminder that this is still on the open > items list[1] -- we have the Beta 4 release next week and it would be > great if we can get this resolved prior to it. > I know. I'll fix this by tweaking one of the cost gucs, mentioned by David. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company