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 1sjeRw-002cDl-Rh for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Aug 2024 12:40:28 +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 1sjeRu-001gL7-Ci for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Aug 2024 12:40:26 +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 1sjeRt-001gH4-Vo for pgsql-hackers@lists.postgresql.org; Thu, 29 Aug 2024 12:40:26 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sjeRr-0020rY-Tg for pgsql-hackers@postgresql.org; Thu, 29 Aug 2024 12:40:25 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5c07eebf29eso264861a12.2 for ; Thu, 29 Aug 2024 05:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724935222; x=1725540022; 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=wicX5VxURMugslYBIMEM6WYNoAm5mEf6WEPpeJPogoE=; b=PWkrzAMXrIycns6r4aAbnN2kIJTNkDzCt1H1Qk0f383s2F0MXwLTzxvhWp5007dQ0I ny8/yGj5D4Oum3DA5k3nxYNSbwD6ih8x+W5zroyRoNG6/TUM2BBGWW7JbVrZGTtnIfi1 jUNhDay2U3mFdNmbGkLXbfKcBck+JGYrDM1NCkQBX+oRzNE1OTjLfNQDyIlV5ZiqI7Eg /JN7jPO9G9R5iTpc/bYg4QLT8Kq/VxUwKC+iO0c38lD0hwXb5KU+RlyKWbHDSBNou0Zy 1oyYC0cHs9zA4lckyadyskWN8bGwr1o6J6tecrdGed/E9COucrF0rOA5sFFFwHwlrTrH 0k5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724935222; x=1725540022; 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=wicX5VxURMugslYBIMEM6WYNoAm5mEf6WEPpeJPogoE=; b=N46594ORLAZ/+MrAFYiWNGdF9YiukkhajTg7fDOCcx8LSgUWnyaRFKMKdA7CVYpgKS KbCEuTVh77fuiZtn4GsHHCjIbeEabhIF4vqePUOr/Lj4Qj5HlKKV3HgOvJaZCkSNpCYr 60/fYAJYug/GklHDiQNnqOwDw0RtGLqhPDpqkRqnJfgIdvap8i+nI1dabeJ049Qo+G7h an8SzYKUFSZBtzboeUmrWR161383ofo7UQJ4ZM8+ym6s+/TolZ7sBs5hMGz0Q8pWUC6u Jdr0sdkVbmJJ0FkI3GYs95+ixlxTTDKxh9MwRAvxFPr4h1i5bHD5Q7L2D2SwgD9KoUmu 2Fbw== X-Forwarded-Encrypted: i=1; AJvYcCV/NWLXM2+ut+sNK2XDBlzNDlhFnNtd6h9iTzTp/MKD8/0nqZlqfXLwo+s/Rc5g8+HOXIedXAtRshtPj+lC@postgresql.org X-Gm-Message-State: AOJu0Yw4V4VLMbO47k41c98JYv7xFC9DTWir1I3b/PX/huKbBkot+ak4 cv/BIox4HUrNmYNFBtd4NWAO4MZ5cqlLZNqF0THiVMNyIRnEoyYjJKChYBsBVaQhOgPN8AYjcLP kKpyAQU0ja12pnHHH7ThCAoX9FVESdQ== X-Google-Smtp-Source: AGHT+IGVPtA7hfJp6H1gpywBVl3Mq1lqfvAIZ2+/dfF4n5vmLUSFtPYL9ZKDy/wJT7l3D7zjEwHT/d0pD/VPKJ70IEQ= X-Received: by 2002:a05:6402:3506:b0:5c0:a8b4:3d92 with SMTP id 4fb4d7f45d1cf-5c21ed8ba82mr3000259a12.27.1724935221793; Thu, 29 Aug 2024 05:40:21 -0700 (PDT) MIME-Version: 1.0 References: <87il22cj51.fsf@163.com> In-Reply-To: From: Robert Haas Date: Thu, 29 Aug 2024 08:40:09 -0400 Message-ID: Subject: Re: Eager aggregation, take 3 To: Richard Guo Cc: 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 Wed, Aug 28, 2024 at 10:26=E2=80=AFPM Richard Guo wrote: > Yeah, I'm concerned about this too. In addition to the inaccuracies > in aggregation estimates, our estimates for joins are sometimes not > very accurate either. All this are likely to result in regressions > with eager aggregation in some cases. Currently I don't have a good > answer to this problem. Maybe we can run some benchmarks first and > investigate the regressions discovered on a case-by-case basis to better > understand the specific issues. While it's true that we can make mistakes during join estimation, I believe aggregate estimation tends to be far worse. --=20 Robert Haas EDB: http://www.enterprisedb.com