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 1thtqa-008Fzz-SY for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Feb 2025 17:14:56 +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 1thtqZ-00DEpz-Kb for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Feb 2025 17:14:55 +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 1thtqZ-00DEpO-BM for pgsql-hackers@lists.postgresql.org; Tue, 11 Feb 2025 17:14:55 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1thtqX-000G1G-2F for pgsql-hackers@lists.postgresql.org; Tue, 11 Feb 2025 17:14:54 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43955067383so6471385e9.0 for ; Tue, 11 Feb 2025 09:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739294092; x=1739898892; 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=BzYReRHN8MiAYOW4WJQaE749aD/Y0Od++ePrJwBcA08=; b=FbqRxGKoC9jFmZhsb+A+ipp/Koz4cOKgGnjU33a5RxsCMhrnkQlk1D6BHb/dd9E4bv ePmkTo5DzUx39BDTiMEpaCKKzNod9yuYMDPCHz4iCVHev/yBzz6L/UboxCBs65+zRwsQ jgGSEr/o+UJcZ94/0MyE3QOmT4O5o+NNFQQ6CG2uykt2B0xwN+biZHYolMQgRR8UMEt7 S+ysPqJMx7+vk6e6OOb+98QL7LEL5wQp6DuN1tXOZ9pw/EJ9ucY/skk0KQoVYSrBx5vB STuWkKxXRlVpgSxL14QK685pegk4WMwyceaoNPlNqOk1/jXXX2LTUoPuVVyfmCVh7Pzu p6Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739294092; x=1739898892; 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=BzYReRHN8MiAYOW4WJQaE749aD/Y0Od++ePrJwBcA08=; b=vYw8037YQHrPn/+jp2cqiuksF0CFwi0K3DW03pdakzbSz/3YLDd7HjOeii7Ey7n6FO coNnzKS34Z1KGn0uHys17SxTfINo/2ehyviiuyyzEs+B6lCBznMC9me5AE5OnPbZHGpz y5doZRvvDF19KvFvRZS12myzBsqsccjhQqc2EEOTjk2OQspJd+QHD3p/JGNPJMAll9Ut MSTdGT80iOUMfZQzYyFaM5O/A/xvLt9iOSleYmHrfVn/3Xkf3E/fT3UM7hw9F4N67ANU 02GMlmLoabkJ3o3GCKThdRdKkctcZ2hRrmTkfgAmsbMl/3/nipPUZRUWUiFxw4n0TjoL 2Tng== X-Forwarded-Encrypted: i=1; AJvYcCUNqodGCCXqrnUEWrYbJ5XPCcCs9rfcLrnaivm9FDO99qjWZkSgat6D1T3e5fNLabFdD3UTmAvmBWIESF5e@lists.postgresql.org X-Gm-Message-State: AOJu0YwC1sjtOawJKh0sb4jaGbLoCuB74SiC4WM7xurLwhYdDw2Dvv1r 7N3VmunJSjW0yPoE37iLto+s8PR5CWp5jbcr9QIvmeZ7vLSGfKrF X-Gm-Gg: ASbGncvry7W0Z3Hz4nDKkN+a1nM7UHtj45cc4f4hD8TaQamnUU/012O6nqHWvPNzELI 9kPnCutUgMjQ8suYZFt+1Be7taXBK6NQoKN/k/AgZYZ5+NZZFo9qa6XfEmDev144qvItSc2dz+0 ZglN6Zg3+Ds06x/F6ypT/WWPk4uq3KhBX3Robg8/fbkQ1wDrFrKUWldYQzcdqbEnsx8grWsW3mt 0ZjegQ+IOtYA6otp7x0j3+ue5un6lrCuiwe6jC/h0CyZxjyl1xZXbDgwtiBNejIzV44t5R0pTT0 jNiYAq8fW+AjrTcv2r8M6bI= X-Google-Smtp-Source: AGHT+IEpVy/GBwiqbaFkU5owjk06+L2H/3zt96cEe6HjnMBbwB15XGqniAgfQLUb/uOV/aFScv+vaQ== X-Received: by 2002:a05:600c:1c92:b0:439:3d5c:a028 with SMTP id 5b1f17b1804b1-43958173f64mr774095e9.12.1739294092137; Tue, 11 Feb 2025 09:14:52 -0800 (PST) Received: from [172.20.10.2] ([31.4.241.86]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dd0d3120fsm10904233f8f.70.2025.02.11.09.14.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Feb 2025 09:14:51 -0800 (PST) Message-ID: Date: Tue, 11 Feb 2025 18:14:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: explain analyze rows=%.0f To: Ilia Evdokimov , Matheus Alcantara Cc: Guillaume Lelarge , Daniel Gustafsson , Ibrar Ahmed , "Gregory Stark (as CFM)" , Tom Lane , Robert Haas , Amit Kapila , Justin Pryzby , Peter Geoghegan , vignesh C , "David G. Johnston" , pgsql-hackers@lists.postgresql.org References: <2954811.1667711530@sss.pgh.pa.us> <55695d15-c738-4401-8883-58bc855c9b03@tantorlabs.com> <58bb3a5b-c92a-408c-b02a-f47aedc1c0e2@tantorlabs.com> <70bc1af0-6910-4f71-84ba-fa02095fe9ba@tantorlabs.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 8/2/2025 04:28, Ilia Evdokimov wrote: > On 08.02.2025 00:01, Matheus Alcantara wrote: >> Just for reference I'm trying to apply based on commit fb056564ec5. > You are right, because two commits were appeared after creating v6-patch > on partition_prune.out and patch v6 must not have applied on master. > Then I created v7 patch rebased on fb056564ec5 . Thank for your remark! I support the idea in general, but I believe it should be expanded to cover all cases of parameterised plan nodes. Each rescan iteration may produce a different number of tuples, and rounding can obscure important data. For example, consider five loops of a scan node: the first loop returns nine tuples, and each other - zero tuples. When we calculate the average, 9 divided by 5 equals 1.8. This results in an explanation that indicates "rows = 1," masking almost 40% of the data. Now, if we apply the same two loops but have a total of 900,000 tuples, then 400,000 masked tuples represent a significant portion of the data. Moreover, switching to a floating-point type for row explanations in each parameterised node would provide a more comprehensive view and add valuable information about the parameterisation of the node, which may not be immediately apparent. -- regards, Andrei Lepikhov