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 1tqKhT-003Aqg-QE for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 23:32:23 +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 1tqKhR-00DNld-Uk for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 23:32:21 +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 1tqKhR-00DNlV-Kk for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 23:32:21 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqKhP-001OT5-1W for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 23:32:20 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-abf5e1a6cd3so214914366b.2 for ; Thu, 06 Mar 2025 15:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741303938; x=1741908738; 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=ZNgqBoSk8IUJRv2oVS2VrpbRwv1py42KZJKffI0xZ84=; b=lEdeh2nlvqTI+B4VbIDXXt0TMJqxJ2GcywSNIYRzfQh6ZuJRclnzsacvI5GOZ7CUYC AjIHDIsVtKgWY3ckjO+CLd/Kgte1+R2rUlm5BNu1uUFqb4dQYz6U3elLPDK9F85YIOKv Yd/A2avQotwobuRax667TMVkN5GnKegUlU9hcFtzRIXMXQ4jarvQ3g4m+T7VdFwRoaVg mJjdI82LAg7PC3zAuwWaprsBgM28Xes5lqamOF0cDm6DRHei8eFbzmrTOmBJxcStupbt qmCF1Rsa8GrLg/gMnT7pY1pp2ttxE7Rw10wLHH1VOUVsnI8nIAsUsmkvkbyNEAPQSABs 4AAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741303938; x=1741908738; 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=ZNgqBoSk8IUJRv2oVS2VrpbRwv1py42KZJKffI0xZ84=; b=tAohtFI3ZQF/G+CC+l4w1NANGU9jccv75e/IEZwKWgsGir/N9BIMjmIV/qe7mzSH62 pE6DlYlGqf6iT4zRdkA2ERmwNPxLpN2BpjuDAgQaLVhPu6DrLvOu7B07U6ouNhwNRTtN 3ehp7gogayxndBAGuAz3mIVnpJjSSjFwc3ULQp30pbBKH+6Uy+c+LB+/bw5FXTtbPW0X Z+N5Ho6sgr5iT/diK+ar7hSsr24IbeJeXgww7JAWamzEubcO3QOMgLHASd7ThVvjZ83K ygVQTKeyGW0dIyfi8sa2xJHmQGazscuBthHUESBWPg51jVEax93R1Zz12+f1362MQ0Ab pi8Q== X-Forwarded-Encrypted: i=1; AJvYcCVtDAIM0sYx932jejFhs+ezl5xgyCjd5RHSwDKL+El6iUjEldFxIyHKaHPuP6vxWouM24It2PKfCBCcE4OT@lists.postgresql.org X-Gm-Message-State: AOJu0Yw8evI25Zl3kVYraXyDqVqhH21WSXS/jEkG8T7+TEYEE6h3dcW1 x6fbgy11T3kcpyJ5nrQNjv8HJmkUz6LiqickpE8u09HNbCwEmsrkfLn5U13PDSsyl/5Z4lkKGLp YRx3+XzZVgQ3x6PuBqFtTIWTnl4g= X-Gm-Gg: ASbGncsCkMNdZVHnH0Ki2ngWZaX3MOkZK1KFL3rgmx3xqnXZhHl1PNTMustQBi+Ce77 7+vhuG41M3HQ8gLK4f61XvG9rK9R7Fqqs7Y0Bz4K6rC5NTOTjAH6/iXSM3jnfBciysxgSIHwSrm FF6GEj0Wpp9Ap4zOWSDWVwQ4QbtQ== X-Google-Smtp-Source: AGHT+IFbh0pi/CKO7fdhdmbuEzr74cpZatJUwXW+oxCvmRufoA7Okk4Da1FCCPd6wAU+JoWCYwyAchY3M1x5FCifksU= X-Received: by 2002:a17:906:d50a:b0:ac1:d8a9:f853 with SMTP id a640c23a62f3a-ac252fb1bd2mr73658866b.48.1741303938096; Thu, 06 Mar 2025 15:32:18 -0800 (PST) MIME-Version: 1.0 References: <73e2440e-7d8b-4860-974d-931a93326d95@gmail.com> <3737950.1740182671@sss.pgh.pa.us> <3816053.1740190267@sss.pgh.pa.us> <40663fc5-edac-4b45-a2aa-a76976700ed9@tantorlabs.com> <432c75b0-be5f-4836-b46b-98c505eaad28@postgrespro.ru> In-Reply-To: <432c75b0-be5f-4836-b46b-98c505eaad28@postgrespro.ru> From: Robert Haas Date: Thu, 6 Mar 2025 18:32:06 -0500 X-Gm-Features: AQ5f1JpYNR76nE2uhu0zKvJf4fym9MMGDoKtEw9MltkO81z6qd3TmaapaP3qLHo Message-ID: Subject: Re: explain analyze rows=%.0f To: Alena Rybakina Cc: Matthias van de Meent , Ilia Evdokimov , Tom Lane , Andrei Lepikhov , pgsql-hackers@lists.postgresql.org, Guillaume Lelarge , Matheus Alcantara 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 Thu, Mar 6, 2025 at 4:18=E2=80=AFPM Alena Rybakina wrote: > To be honest, I initially took it as the total number of tuples and > couldn't figure out for myself how to interpret the result - 0 tuples or > 1 tuple in the end. Maybe it wasn't quite correct to perceive it that > way, but Matthias's explanation helped me figure out the reason why such > a strange result was obtained, although it's not usual to see it. Yeah, I thought the same back when I first started using PostgreSQL and had to learn that it wasn't the case. I still think that's what we *should* be displaying -- I think dividing by nloops obscures the data users actually want. But it would admittedly be a pretty big compatibility break at this point, and at least if we display a couple of decimal places it's more possible to approximate the undivided value. --=20 Robert Haas EDB: http://www.enterprisedb.com