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 1twxy3-001R7a-Aq for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Mar 2025 06:40:55 +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 1twxy1-00H4cg-IV for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Mar 2025 06:40:53 +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 1twxy1-00H4cY-54 for pgsql-hackers@lists.postgresql.org; Tue, 25 Mar 2025 06:40:53 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1twxxz-000zj8-2A for pgsql-hackers@lists.postgresql.org; Tue, 25 Mar 2025 06:40:52 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4394a823036so52628345e9.0 for ; Mon, 24 Mar 2025 23:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742884850; x=1743489650; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UaU44PrUXbxxvmoMChe0tFh3u5+9UmC9tzYpJrHfrXM=; b=PRbR3s89NYM3nZcnzudlGhoMyyw3O75gl0/6+EvTu/TMSrV4YyD6lmFnw7ZEepO1p9 8HcE2kvikYIEHfOQ5ENeQCS41uhLZKJ8PyPATUSOFdsIcTK1qD4wLuFolJbPzhZbRat6 cTIJ8y37iVicdR7pfxHkgm8Ifqw0D0BanMUDCabw8hyl1Ml7Xz+7X2wSVA+h6u8gqJuU VHJAYcjugIPtOV29psrh5Wmnz840n1gF7zUL2FjZ9XAf7AonqTqB18eOwzI8UQOI5Weq /4eAqbK2NRYIEW8cytqd3RLECo1sLMw2I6LzkxK+nNGdfxMoH4rQHtHXJ5LJ13GF2+p4 GUxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742884850; x=1743489650; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UaU44PrUXbxxvmoMChe0tFh3u5+9UmC9tzYpJrHfrXM=; b=jA61wR6gPfCVF5SxYGRF2nUtlxZXczz2hwexemOPXVhPrEzd2/IwopSWWSYx3y+JL/ e1b4kPRmtdhtsxmAdvOlJjt2aH4KF9veUXCIxVR2CueSxdMBJASiKJWVziL7DSqzvclW HJ6rnlaRQrVCfS7Oj4tJV6N4q//ksnWEdTeW3mg2tR7HJjA9QIZ7A/BtbfuWAweji/Sq S6t4XroBn57ARL1Nt7khulpcnBQKj3Uen20melTgSh4+/ucwKrsISEcpPOnLCxkNjYry 8+MmX8eGTe9ibeHiFdZCPovzmZUxQEJ7U/X3Xy3Xrj8E82QzN6Zo82AR+SpVmFMvlHVE 1Iog== X-Forwarded-Encrypted: i=1; AJvYcCXmh9Lzp89fiuYGpX/IxrPBCJQtty2K6u7uRwLMz0fJjcUAFZ9gdeBqNnAKqfrMMUP6dyV2Wbxd0dBjT6E1@lists.postgresql.org X-Gm-Message-State: AOJu0YyfNPK1SX3eCtX1uHWpqpjL3RaRIOg+Jz0l/S6rAwIUBN50+Qnz bAYoKVQyfZogGG/WQRd5qohskVdjbKNAdQuazeZXTDqi9TWWWXad X-Gm-Gg: ASbGncvNJ+/+yVh6k8n0fROj5S2nU4bjILdm5v/GdPC+F0lTFxO7cKLIpp7st7zpaGm 90cUDiLnxIZa4GQzgJnKm35ssCSMfrQto+rWJQCUzNdcjFu6Suu9nNQON5MlU+1gVoRbQjp+ABe iSf4vd3NSUhWDsYQBdNOC1yrkR9fwb9xrqRLVwwOA/hg89GMnhEoKFR0i7amLqS12wdmBRO1Ru3 9XiLtNiRDhpnbRXlk8KND1vxD+UpAhrU636Si79TwBXMzzDXOJKHuVrjB0cjjOCsxFK0miNk0kp I2uZa0QiBzvba2jtgmd61njMPvDhDpAZBuIDri435YpVrvlo5qsv0lSFKGAlXa1wzDCTrzIPauF eUV6nHC3hinry4jM= X-Google-Smtp-Source: AGHT+IEkAh/Pr7SYFV6BigR1LdtU0Qv0OJX/A1WUIvvaYGZkQ1bqaJKDI6ToWwIdeAIJAHzpjaisdA== X-Received: by 2002:a05:600c:510d:b0:439:a139:7a19 with SMTP id 5b1f17b1804b1-43d50a1d901mr124932175e9.23.1742884849769; Mon, 24 Mar 2025 23:40:49 -0700 (PDT) Received: from [192.168.0.211] (84.123.232.230.dyn.user.ono.com. [84.123.232.230]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f556basm190959185e9.17.2025.03.24.23.40.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Mar 2025 23:40:49 -0700 (PDT) Message-ID: Date: Tue, 25 Mar 2025 07:40:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment To: David Rowley Cc: Ilia Evdokimov , Lukas Fittl , Daniel Gustafsson , PostgreSQL Hackers , Nikolay Samokhvalov References: <51A15CD7-E31B-483D-B911-D0EB9F5FF952@yesql.se> <44229379-3901-4cb0-8812-b354ef70d5e2@gmail.com> <8e12aa55-39eb-4e03-a8f7-077fe02309c3@gmail.com> <11c709e1-9b17-4c00-9ead-93609a09b9db@gmail.com> Content-Language: en-US From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 24/3/2025 23:05, David Rowley wrote: > On Tue, 25 Mar 2025 at 10:23, Andrei Lepikhov wrote: >> >> On 3/23/25 22:16, David Rowley wrote: >>> Once again, I'm not necessarily objecting to hit and evict ratios >>> being shown, I just want to know they're actually useful enough to >>> show and don't just bloat the EXPLAIN output needlessly. So far your >>> arguments aren't convincing me that they are. > >> I'm -1 for this redundancy. > > I'm not following what the -1 is for. Is it for showing both hit and > evict ratios? And your vote is only for adding hit ratio? Oh, pardon me. I wanted to say that IMO, the couple (capacity, distinct lookup keys) makes redundant (hit ratio, eviction ratio) and vice versa. -- regards, Andrei Lepikhov