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 1tqBz9-000vzV-CA for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 14:14:03 +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 1tqBz7-00D4y8-DD for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 14:14: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 1tqBz7-00D4tC-0U for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 14:14:01 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqBz5-001JUO-0f for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 14:14:00 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-abf42913e95so106802966b.2 for ; Thu, 06 Mar 2025 06:13:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741270438; x=1741875238; 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=YBusPFqVdYHf+ONZqQydfgNhXhb+b7pKG5ZQ4Tk7PpQ=; b=Ljc01F1ipxM0eW4AU5aHNXVV3f8pgwiJrigFuHpgzwNPfwh3L9WWIQCYVdf3ysOS2r gOlosvOjGbORwea+UnXS79kaCYaXO6RxVu5Z9zpmF0pmjusKGYcl29zMVyKK7orLgO3l q6LnT/WvRT0XwlhItxxP3DXlIDDR9cUVphXnQ3ZhYvGZTlWFuzr7hlZso5aBMS9K203m tK4x5qiS8eDpObVjp+3762AWzilzKIqjG8VlI+QtigaDWPnz/B6+jvVLNou89m3jbkHX /m2bwoBbeLIgNZk19P4KZQLMjpZcj/GyvGkyfGn49evIi/ChEcL1bHo2nFOm/fAzTldp 4NEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741270438; x=1741875238; 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=YBusPFqVdYHf+ONZqQydfgNhXhb+b7pKG5ZQ4Tk7PpQ=; b=NjJVn7YTVtXH9SNRmhh8PySP+ef5FmcVkAUgpAU96t1d8MlJMc4AdyPXikbUQBNwhB h/H14Xirv9P0IZBcT1dsRpP85LWV+gLspm2JhFcsErOC39x4zP3AIdCziCfen25EEv3Y kt/Joj8sLy2e6EoIcfCZ9GmKLUWGMxCwvvDi5jAN3JFPhgpW34Qr7LDrkfDyGSPAjlCS nXe1O6YZDfG0b81dvuAwKz3c8wOL8lp22Dxwht8Tli5SkxTGl0xECDTMr58YHOQ97udj Xwcwsi0BRYDwwXhflW6iaAvqVxVjvbc2tGwVxdCmOlf9ZPBDDzxhK0h7TmCscNJoqaFZ izBA== X-Forwarded-Encrypted: i=1; AJvYcCVRQfR1m0aHVPyyTWpxuXDVGDyavk+4bdq6CRiQAvDXCAbS+XA3b/McYiFbXodqk6dqi1gmJxTWmO2FoCSE@lists.postgresql.org X-Gm-Message-State: AOJu0YxazNETWHoKFpYTpmsjjEXjDFAhRtN73AIwEAEuCwvibgF0UTKT 2VMMRajvRtQRhf42/MO1Wo+8tYRYvpEpqTIU3I2kpL148dQqJYQGGYpf9iwaeri22lFWF09s3Ty tj8DmSugTvq74hqCRC6tVsfy9W+E= X-Gm-Gg: ASbGncv7UCoEGqSLGMxnT+cGQe1LT8x0CuEGEXiX4pPMi1G57Ab+YK1cS/KYmz7Zny8 txwI1Dq5E9kpzqB7z0XcR00c3bZiRvLEuxPtL5JyTwvZFw+lvWmJwhbB4/45ru6HDvnYLC4ymvd w9a3hcFY3ggxL3ztROihLO14yraA== X-Google-Smtp-Source: AGHT+IGTuM4u2wUZY2CyVI1DDt8UmjsxCKnSaH1hyEQQPTRRO6jy6uhenyV1h/Pxn7/zcj5mehj765IN/mEXYxsDLgs= X-Received: by 2002:a17:907:9445:b0:abf:55d1:67f4 with SMTP id a640c23a62f3a-ac20d97e855mr726453866b.7.1741270437605; Thu, 06 Mar 2025 06:13:57 -0800 (PST) MIME-Version: 1.0 References: <01ec86c1-e04b-4cbe-b641-22cae8b87604@tantorlabs.com> <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> In-Reply-To: From: Robert Haas Date: Thu, 6 Mar 2025 09:13:45 -0500 X-Gm-Features: AQ5f1Jo1KPzW6vf1fOS3g9pk3nn6k3lSBhPwQGJbyJjlTYeWIlJ5VNZ5uITqxgc Message-ID: Subject: Re: explain analyze rows=%.0f To: Matthias van de Meent Cc: Alena Rybakina , 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 8:30=E2=80=AFAM Matthias van de Meent wrote: > On Thu, 6 Mar 2025 at 14:18, Alena Rybakina w= rote: > > > > Hi! I got a query plan with a strange number of rows. Could you please > > help me understand it? > > > > To be honest I can't understand why 0.50 number of rows here? > > Because the scan matched only ~(500 rows over 999 iterations =3D 500/999 > ~=3D) 0.50 rows for every loop, on average, for these plan nodes: This is a good and correct explanation, but I'm VERY curious to hear more from Alena. Like, Tom expressed the concern before we did this that the fractional digits would confuse people, and the fact that someone who is a regular participant on this mailing list was one of the people confused gives credence to that concern. But I want to know what exactly Alena found (or finds) confusing here. The Nested Loop executes 999 times, so perhaps Alena thought that 0.50 was the TOTAL number of rows across ALL of those executions rather than the AVERAGE number of rows per execution? Because then 0.50 would indeed be a very surprising result. Or maybe she just didn't realize that part of the plan executed 999 times? Or something else? Alena, if you're willing, please elaborate on what you think is confusing h= ere! --=20 Robert Haas EDB: http://www.enterprisedb.com