Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v47tY-0091B3-3L for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Oct 2025 01:14:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v47tT-005XDm-Kn for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Oct 2025 01:14:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v47tT-005XDe-44 for pgsql-hackers@lists.postgresql.org; Thu, 02 Oct 2025 01:14:03 +0000 Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v47tQ-000xaq-2z for pgsql-hackers@postgresql.org; Thu, 02 Oct 2025 01:14:02 +0000 Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-71d71bcab6fso6028867b3.0 for ; Wed, 01 Oct 2025 18:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759367641; x=1759972441; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ovmYNju1rxa2jqVXuHCHhHb+SWF/P5KukRrIjJysrkI=; b=TXsu4ZImMgeIAQUNB9KfkPKxErhCH89ezqt6gUGENOfTTL+NnG4rPvdpGKmb70d4b5 Q6fbMr7Ny1YMOXg9RLVSdRUFLZd0LTJlIavYQomEeWT4jLWOHXCVct/8bDuryrX309Y2 Z0G5H+nbSoa7zYyssrNOnrtF80zZexIWPhD3qv9xbKmxa5DpGfCuPzGNuj/9roU0xHPE f6WAsrmXf21gKS/xJiG3oSu1ozeD15MCZ/Ia002d3a+2kHUaFCHfC6q3BmGpQxVTerk6 DlApcyPsyB2X22yxzFURwoK/u0dC7+pKV5Txa1yghw1vUKHbTjCnIf5gVl7er59FFIbO Kpng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759367641; x=1759972441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ovmYNju1rxa2jqVXuHCHhHb+SWF/P5KukRrIjJysrkI=; b=pSbyxMcFKO85k6PRw2dVRDFMQtd6R5BJGs48JQdveUI6J2yBZxDpPQ5EywGsAeEWAy QSokEk8OujMZgaQcCvoO6QCj7xOTQhTI2qi56fP4iQtER9Sjd0vSwqatPth0OYlHlcr6 HalLYicz0yEcisgLj5118CtqngXBWoH6CdFDqWgPGN40TjhmoabVJbDKkaaTGi/+G78a V4YxJtgNtsTpGMogBkW1UU2Dxjg8dg/+hTDr9Db/vpyQGq3hiv3jq74APOYif3gKoiw/ Dl5oqGuwLorlz9/9ManudzHKUY4fJbg5//z/XGTCmwYoGfa4G+U4wJCMOy15dzXbqFm9 fJJg== X-Forwarded-Encrypted: i=1; AJvYcCVA59JGQlLdXrAnDPVQekoQ/ab2duM2//8kEMJIDPrQfHftpBP2uim7DC1JPIWFS8Mk1BRz1+zWljJQS7ov@postgresql.org X-Gm-Message-State: AOJu0YzkRyPoOx5qAZ23VsQw0htWQ9Ug3ijAgba7zhtMopOlDHBGc39a fBhxOx3sNdm6wPhMWH96fzgZZe1Tr5LWQFsvcd8v2xoi2pXtvsvwuxtDxfVU6F++xE7eRVpFsq6 YpiPtSLKI+Lsiq6Mj5N/Wfp9qYeYl4yI= X-Gm-Gg: ASbGncu5HHBx6CT+/iBIaP1/asngbK6x1mntsD2yZyMgWFhjv5jSWRS90rPEKdYeBhX Eurr/s1VuHRZhHMI8VJ94SY4T+Zd9TflsyAV+pLoSRycupu6WhF7Yfn2Gosekod0LoU+gGOyv3l sf3Cqct1gbua0+IZG7L4IU9/t+TO0Wv3HZcLq8MZRAq0VxVelWtmPV/SQH0aTXLjZXPCQQVOas9 sK/PcQVOF6oxEOdEZB9ZBxcq8ydXiwDMQ== X-Google-Smtp-Source: AGHT+IHpxqh5hi78xPm/xnGhS9/Ze0+sAzz7a5waB/OcczoojqSNxjZo5hjOZIbDkBtSj1z9lOPRAZZJ24ZMK/Cn9qQ= X-Received: by 2002:a53:c0ce:0:b0:635:4ecc:fc20 with SMTP id 956f58d0204a3-63b6ff570f2mr5389660d50.40.1759367640909; Wed, 01 Oct 2025 18:14:00 -0700 (PDT) MIME-Version: 1.0 References: <87il22cj51.fsf@163.com> In-Reply-To: From: Richard Guo Date: Thu, 2 Oct 2025 10:13:48 +0900 X-Gm-Features: AS18NWCanvD2QchGKsWdaQ0ENTFS048KFa_stpNTAWQiyVKroDOemFGsC3hhWwA Message-ID: Subject: Re: Eager aggregation, take 3 To: Matheus Alcantara Cc: Robert Haas , Tom Lane , Tender Wang , Paul George , Andy Fan , PostgreSQL-development , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Oct 2, 2025 at 8:55=E2=80=AFAM Matheus Alcantara wrote: > The query 31 seems bad, I don't know if I'm doing something completely > wrong but I've just setup a TPC-DS database and then executed the query > on master and with the v23 patch and I got these results: > > Master: > Planning Time: 3.191 ms > Execution Time: 16950.619 ms > > Patch: > Planning Time: 3.257 ms > Execution Time: 3848355.646 ms Thanks for reporting this. It does seem odd. I checked the TPC-DS benchmarking on v13 and found that the execution time for query 31, with and without eager aggregation, is as follows: EAGER-AGG-OFF EAGER-AGG-ON q31 10463.536 ms 10244.175 ms There appears to be a regression between v13 and v23. Looking into it... - Richard