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 1v5ZWq-008kV6-Ak for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Oct 2025 00:56:40 +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 1v5ZWo-00493T-IY for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Oct 2025 00:56:39 +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 1v5ZWo-00493A-39 for pgsql-hackers@lists.postgresql.org; Mon, 06 Oct 2025 00:56:39 +0000 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v5ZWm-000EMT-1F for pgsql-hackers@postgresql.org; Mon, 06 Oct 2025 00:56:38 +0000 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-71d6014810fso47364277b3.0 for ; Sun, 05 Oct 2025 17:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759712196; x=1760316996; 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=0LhFnrjLjiGwhuUcvQsCsilgI5k/oj87A/QDNZF10VA=; b=fxaTaphY9BnsFoeH7Hk0dwMYFOjYvkF0ECP1JBZA52QFnxROSvgaL2y34UJmVOqIae eOhbjdyQ2tIbizr3XfrsmPCbx7DBljG4aPICg1YspuYOzYyzKjTIcGIPbhwPfI/7kIGi yf/3aiqTl8iyMYvr/ABHmxFgmWUebr+yxvJo7YFbSEtzi5pY85L5lG4drzuLXlJOo2nT YXuVXxhhVHBBcG9gI3nnqM0ppA7kaVIldJ9U6XzTYynwGriMD52mVa3+CaArryg2UU04 XyPYKS1NZNy08l8MwZjS4CPtz0IfrPQiOId3cO0ftK492MR+rcq5gfBZOeErTh0PAEJK O8tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759712196; x=1760316996; 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=0LhFnrjLjiGwhuUcvQsCsilgI5k/oj87A/QDNZF10VA=; b=tSFWsdEVjmU+/CYjNFjjZFgae/YbdPI3npZpgTN/sfF3AAjt2LNwONuAdexvTV5kv/ eXIdyaGdq7W6ZB4vbzEroS+ZeGuA7LyFoTqLvBHL3Vtfjv7JjUCEoHYXt+myESUX13na tJeobKKEnmpE1wqIWzSNm9oga3SuU5XeWj3omZ4C3GzGW0Of9MAGGp2/mAUZYRGJg02Z kmFE4OzoCvMi6QMYTjfJtFmBceW19xm7lBAnkoBI+TU2LRa60e+IyVYGjDFU0SIGd7Cm so1RmmdTqDvBWbmUfEDPaGj3MDyiGd9UO6/duZayJG8OhmJOkD2zcmxdNo5HekjSl3/T Lv0w== X-Forwarded-Encrypted: i=1; AJvYcCVcOd4TGeKV/xtQiHbvef/e8OUxzd0D3OgYtvTXFWbc2CDcWRPsfcsF7noYGsW1lPzHPcfFy52spSyIoziO@postgresql.org X-Gm-Message-State: AOJu0YwVSdj97WF80th2l9npkY1CoFiDirmK7UiI476pHe8uB4dzS9b0 Z6Jvqqe50wAE4Ic5McJDWkEoTWXgjHjJbi1ajjkS2DNkIC67QmiYQekfjUXNNYGdcYnz1HuRac8 wiSEKouMvcF8aYgRYjY2kWzeQv65IVV0= X-Gm-Gg: ASbGncvXKPkT5phy/OkiIJLjwX6wBgmBdtbtIc6ALMAM/0z/HyNvaaRUQQ+QTL45Vus rtBeyGdWXa7hWF8R5yorgf6LuAH/bbJKGGu5FJzLAGwOIiqEZ9krDCDsxU7LA02+HSnJ29MGBd6 dTIX5uApcE2iQHkK2xJN7iEx46Wi8VHFsY0PX0ywWhwp8aVeJx7fYDXfWKiAZerQlEoVpYYDlH9 4nR6p8vYckyb1gK/j7u5lKZvuegVqBber+/nkXX5KE= X-Google-Smtp-Source: AGHT+IHaI0Lt+akJY1ACnr4u76oELydYl9RgjDP9r2f+MqsQU6ImZgHvIxGAmm4qTVMKeESz259ltW0hnnrOYPbxSd8= X-Received: by 2002:a53:ed50:0:b0:636:5bf:2e30 with SMTP id 956f58d0204a3-63b9a0ef777mr7856675d50.38.1759712196578; Sun, 05 Oct 2025 17:56:36 -0700 (PDT) MIME-Version: 1.0 References: <87il22cj51.fsf@163.com> In-Reply-To: From: Richard Guo Date: Mon, 6 Oct 2025 09:56:25 +0900 X-Gm-Features: AS18NWAsvewXGV4maA0j_ivtdnEwD4rHgdmuiI6KkopKC9viTQQOitBy3eubkRU 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 Sat, Oct 4, 2025 at 5:03=E2=80=AFAM Matheus Alcantara wrote: > I've disabled the cassert and executed the ANALYZE again before > benchmarking and now I have similar results with a improvement on eager > aggregate version: > > -- master > Planning Time: 2.734 ms > Execution Time: 5238.128 ms > > -- patched > Planning Time: 2.578 ms > Execution Time: 4732.584 ms Great! > The performance results look good to me. I don't have to much comments > about the code although I'm still learning about the planner internals > this patch seems in good shape to me. Thanks for running the benchmark and reviewing the patch. > I'm just attaching a new csv with the last results after running with > cassert disabled and after executing ANALYZE. It looks good to me. Yeah, the results look good this time. There are no performance regressions; on the contrary, several queries actually show very really nice improvements. - Richard