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 1tzipK-005iQt-HZ for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Apr 2025 21:07:18 +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 1tzipJ-006dpu-9u for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Apr 2025 21:07:17 +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 1tzipJ-006dpm-0L for pgsql-hackers@lists.postgresql.org; Tue, 01 Apr 2025 21:07:17 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tzipH-002QYw-0W for pgsql-hackers@lists.postgresql.org; Tue, 01 Apr 2025 21:07:16 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-30ddad694c1so40801681fa.2 for ; Tue, 01 Apr 2025 14:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743541632; x=1744146432; darn=lists.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=H7TOpRzsZEfwC1+IEZU2uIrGg3IL50xulw7a25nTdEQ=; b=QxO5I7mSvHGqIJyV2IyARUgh9uy+8Iqg4jqTyL8/aMOMkWzdFrtpkeaRiA6RtdgOIO LTUEL7gd5/vqd99Wq+t/mTg96rnK13sXI5py9WDf9zGV7IEcfCcllq4yHmTbNzR2JbzE BTW18+9T4X/g+zWh2i9J/f0oLgPpkbJtSTQmqxslkEejWpx7/+NCrkBsaBBgNRThHRLR fle/Gk1BthVAIlZ5nw/DgRcOThaH2ADYFOG3bDdrB77rkups0vX0oCMw7/ZZxXQ+qmLy ZjmOvyW+acyQCHJA/58OUleO1jqG/OK+0QznwYygzB7kIg1k4XNUbLrde9GoaQKKvYSL cqHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743541632; x=1744146432; 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=H7TOpRzsZEfwC1+IEZU2uIrGg3IL50xulw7a25nTdEQ=; b=aZLzrDRS4aW45bfORRkO9Q0QQ55utkLmsF/fI2n9YWbkq/E74VHCAKaHza3AJ9nqDz WH3MAYOx+yuQlsoZWkMSZXl683hc5q2gvoRg41omwtwlHU8oH3LktSV1DK6+GO2TsZRM soUkRH8PaGFKrGPq/B25ahNQDqLANMxPIBvq+ItY7HhW2AE2kEzndCIJ3W7J2YX1kgj/ G0DiKjw0VcQkzVIKIaRZTHg6IAbmfHrnOWKSNXdxPrVnmCraAcSKS2MKeUbU77C51R+Q sHCsn7zh7zJrjLAvJkHtKZwTgurUMn9Uv62NsXNTUhzhwr+ySKVlLyUzYj8JUlQ/Frb9 nTrQ== X-Forwarded-Encrypted: i=1; AJvYcCVYlfATHKAmn4SI68bCAhqIYnA8wYj5j/3yXZw70fEWLKKFuheXTZQmr9zKHa6Fq4q2KurTvAP/f5srKmSR@lists.postgresql.org X-Gm-Message-State: AOJu0YznsdKN4NrDj9GNPNuE2w9iQnmLtDUPCmnlVZQVYPkMbhmEp0Q4 Mg1aZwqJDWdluq2zxbJMI8g1A5mnVxzLgdcbTXsBhJ0WuNNQ6I2mR4fqkqR+P+2twJ26+kFNa8s HmSXzsbIn2LrSzksJJN1Cm8lAtm0= X-Gm-Gg: ASbGnct9uAgafDMcBY5ki/KWz+ZrtJTgcYTVIRXOmBwLuPa9wugsBdaoEP9nvUf9TXR OE3jaAN0djRQZLJz9Z95zsaXlHl1ZKVKI7cBcwjQGBcVjgIOHaZJfbJGidYd7rVq98dcoa/CvJK pfSDA5YSjh7DHm5Aw839If3vxpp2QtdbEHWjo5N7Cq6hEbkg0+jivajk3yfjyPlp53Xd6zF8s= X-Google-Smtp-Source: AGHT+IGCPEdoxKStVruK6QdMkFUZnupro+ORFSCOYXMm7nPJS5VWoM8ckHTTo71FP38YK68iYxLCEc3qROVav+cA5G0= X-Received: by 2002:a2e:a88a:0:b0:30d:b8a5:9b8d with SMTP id 38308e7fff4ca-30de024b448mr48116051fa.16.1743541632308; Tue, 01 Apr 2025 14:07:12 -0700 (PDT) MIME-Version: 1.0 References: <44229379-3901-4cb0-8812-b354ef70d5e2@gmail.com> <8e12aa55-39eb-4e03-a8f7-077fe02309c3@gmail.com> <11c709e1-9b17-4c00-9ead-93609a09b9db@gmail.com> <1161645.1742854534@sss.pgh.pa.us> <1164845.1742856354@sss.pgh.pa.us> <3ba16aa7-3cb2-4289-b773-522ae2f03a77@tantorlabs.com> <81ef0f5a-b6a1-4417-ae3a-2bae9b8d419e@gmail.com> <67b5c84a-dedd-4103-af7e-0117046102fe@tantorlabs.com> <580fe72c-85be-45a8-9e00-6b5417690557@tantorlabs.com> In-Reply-To: <580fe72c-85be-45a8-9e00-6b5417690557@tantorlabs.com> From: David Rowley Date: Wed, 2 Apr 2025 10:06:59 +1300 X-Gm-Features: AQ5f1Jod2d9u4_fgcihd-2aeCj675DE6vxJQmLYk3Gof0dilrQk_pcOle5HT5ss Message-ID: Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment To: Ilia Evdokimov Cc: Robert Haas , Tom Lane , Lukas Fittl , Daniel Gustafsson , PostgreSQL Hackers , Nikolay Samokhvalov , Andrei Lepikhov 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 Tue, 1 Apr 2025 at 20:52, Ilia Evdokimov wrote: > With the feature freeze coming up soon, I=E2=80=99d like to ask: do we pl= an to > include this patch in v18? I don't think there's a clear enough consensus yet on what EXPLAIN should display. We'd need that beforehand. There are now less than 7 days to get that, so it might be unrealistic. I tried to move things along to address Tom's concern about not wanting to show this in EXPLAIN's standard output. I suggested in [1] that we could use EXPLAIN ANALYZE, but nobody commented on that. EXPLAIN ANALYZE is much more verbose than EXPLAIN already, and if we put these in EXPLAIN ANALYZE then the viewer can more easily compare planned vs actual. I had mentioned that Hash Join does something like this for buckets. David [1] https://postgr.es/m/CAApHDvqPkWmz1Lq23c9CD+mAW=3DhgPrD289tC30f3H1f6Ng59= +g@mail.gmail.com