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 1ueTTK-00AB4t-3w for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jul 2025 07:01:02 +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 1ueTTJ-000Qj6-6X for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jul 2025 07:01:01 +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 1ueTTI-000Qiy-T5 for pgsql-hackers@lists.postgresql.org; Wed, 23 Jul 2025 07:01:01 +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.96) (envelope-from ) id 1ueTTH-000LMe-1M for pgsql-hackers@lists.postgresql.org; Wed, 23 Jul 2025 07:01:00 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-60c01f70092so10807282a12.3 for ; Wed, 23 Jul 2025 00:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753254057; x=1753858857; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9XGxtjXpMxYxUiZoxkwp/gUAUaGbKQV/RPw1YST8UBs=; b=D/QsSPwd9PylnC7rbvigRys78vB65vP19bfOB5FDV29hdhgaPZem1XnumFjEDkXzTD ll0qHsqvcDbYz+NKnDsyKFsMQl+07M2iqS/vsxoqeaHqMpSbFQp+PM5BH5mTNkZMglYe sYh5SrOKYghvSkWBqDvh1YnvIaHWUbcw4LwcKbjWa4pK8DG8ppiS3C2V74AJjINZUAMT NL7sDFTukV6mRIp+rT6tzwYpiPtLDGA/MNbpaHBaZM8kZQGKgNVYxsCtuKMIg1H7C5zo lqgPzGs333+VrvUk8P54WuhBo8O7dPJmhM0TTnEaCoudJ++I/Xg4/bTXg6RwTOOLs2tn 6VZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753254057; x=1753858857; h=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=9XGxtjXpMxYxUiZoxkwp/gUAUaGbKQV/RPw1YST8UBs=; b=bRfIPHsnA5S57yHzzFT5y+dQY9I1NENtqKMNsuyPSqmnGRBl5CGOy6SY2+1Nsj93Sv bWWYYVwmnDT45prodrpme4kb+4PQ/V/u2Tj7QE9l1mDWCibozB+d/z1nzMeO/6NAKggT wyjjTmiIn+gkhVtq+BDRldyKXOSASvXvCG7y03kkXoL/rwZpOppXitvJ9RWhpxWiFEHP Awdq4MKcMBS3ajUeJvEe2i56MYRmV+fEK5xfXLlFDRSmrdFA2WwCfflJPun5molGnbJP MALwB89+9o5N7u/mgelnuB4+zl4/OJcnRpBkKmoDRmQh1HmqjG5SJVgtJNSS3Y6kySDm SHAA== X-Forwarded-Encrypted: i=1; AJvYcCUE7ZGizSczqazPjusRVZYcXp5Bu18JwojtQolVN7nKPJoq2P7Nw60jtWsOO88PFfLFEHNFAlCwFDR0s4KB@lists.postgresql.org X-Gm-Message-State: AOJu0Ywsqb1XcS1l3MtckVlCHF9ndy/y6wkT2ABuW0noGI4Plxcki160 pQz3Wph27ws8ZfUGIaGFsYy7PQJrjF8bY2BeUjW6FUm11mhhJ4NdTupX7Rg3nmnPAMSIox39TvG nWnalmMqWlWHPeIjarMT0lFKZSfiuJRs= X-Gm-Gg: ASbGncuPFVw+lDzbA4oRbxuabO2BVCR9yNIa6dzOMMrPBntk/+DHjoryBctsxr5JsJ5 BZUO9QWs0nCY6UBnrwiOhJseTyL0O8iBoQGInrJxzHxiL/a306vepwK5GadPsIVrXTiu22Zezxj zDBldcFtwP65TgVA5UUWoARwYDOB0gjoaoLxlWjsg7zb5MA1ZLR/KldoAQzWYn2MFpGGhJ09jz7 KvI727H X-Google-Smtp-Source: AGHT+IGERul0O7ha6NmbOTSoMrs12R+6kC5JJHOkJ3ipyn7oMHb8ds+67DGTUCg8jimWEh8Nqnn5l4+qNylF52j8wfc= X-Received: by 2002:a17:906:7952:b0:ae6:c9b3:57cb with SMTP id a640c23a62f3a-af2f66c1178mr161300766b.5.1753254056349; Wed, 23 Jul 2025 00:00:56 -0700 (PDT) MIME-Version: 1.0 References: <67b5c84a-dedd-4103-af7e-0117046102fe@tantorlabs.com> <580fe72c-85be-45a8-9e00-6b5417690557@tantorlabs.com> <3ea66a50-e4b0-4f20-ae0c-4d9cbaf81cfb@tantorlabs.com> <0e8dc4fa-3655-4e9f-9424-9b32a15e6acd@tantorlabs.com> <7e995158-157e-4ec6-a7c8-266c1a6f7b43@tantorlabs.com> <06840539-e321-4930-9f89-cfc783c5b80a@tantorlabs.com> <15e0422a-31ec-4e82-b0cf-0839f636b185@tantorlabs.com> <5c7034c4-c48b-428b-ab3f-67f14d9f542e@tantorlabs.com> <34407b2d-946b-40cd-a665-49ca6af62fb9@gmail.com> In-Reply-To: From: Andrei Lepikhov Date: Wed, 23 Jul 2025 09:00:44 +0200 X-Gm-Features: Ac12FXztzNb5it9zM19I4jShhw5rlYwUPhEN67JUE79EVYk4mi38dn3fnGhuMeM Message-ID: Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment To: David Rowley Cc: Ilia Evdokimov , Robert Haas , Tom Lane , Lukas Fittl , Daniel Gustafsson , PostgreSQL Hackers , Nikolay Samokhvalov Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23/7/2025 02:11, David Rowley wrote: > On Wed, 23 Jul 2025 at 02:35, Andrei Lepikhov wrote: >> However, at first, I'd consider how it could be added to the >> IncrementalSort and HashJoin. The number of estimated groups/buckets may >> also provide some insights into the planner's decision. > > Sounds like another patch for another thread. Maybe, it is up to you > Do you have an argument in mind to support adding the group? I have not. I just thought that grouping would be helpful for an explain parser. -- regards, Andrei Lepikhov