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 1tlaRd-000M9J-EC for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Feb 2025 21:20:26 +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 1tlaRc-00GXXu-8u for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Feb 2025 21:20:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tlaRb-00GXXm-So for pgsql-hackers@lists.postgresql.org; Fri, 21 Feb 2025 21:20:23 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tlaRZ-0002DJ-04 for pgsql-hackers@lists.postgresql.org; Fri, 21 Feb 2025 21:20:23 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-abb90c20baeso342816366b.1 for ; Fri, 21 Feb 2025 13:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740172820; x=1740777620; 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=eL42rGaj8r+jfnFM3RiFE+kQf6fvsY+udJ4eBXpGG7w=; b=T1lJHUNcvqjzoBeF9FCT+jvD/Ms9E/IlNAeMzGXYEBnYcuqacnrKgvGILUosKnz13H ru/8qvJoMpMhNKivAIAPG4Rlb1aoF1idMdivpEfY19B9GfcPu7VOZ8EfUa73cUYbPSij ROiDL7I4fVLtt0A+U+vo+TKnXM6bIu9xoz+/sURg2Gmoeq2v1eSsPU6/dmjvvU3Y3lm/ fp0Ovud2g16BxCr9MBpALmrlckGCTE60QLao75KUwCBunYlTV9+lnnk5uoRaUPv0oMr/ RSZ1dtUmOMsvILQ9mOvP0QkiRGQbdUona0Qfp7lKd5uGnewhURjYEJfSncLVO8adJTCn rFoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740172820; x=1740777620; 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=eL42rGaj8r+jfnFM3RiFE+kQf6fvsY+udJ4eBXpGG7w=; b=IvJiXQ+yJH/XyCTwOQSSESDlEEjlmAOYKTsISPrCwR6I7S0x642CyrKXRXaRQ0/jJb pupkv0+9jmFRUiaP5nBgjkhcyaA7yfr3wUBF9CGujNhxhP4rvE53s04aD272PhuWs6pd ZjTbfngSaqBLGht8g/c7WNTOt67SRT3Ji8WACyKApEs4/p0wLYPJS6CQgGmYEsDvZz8n 9M/3xnynbPpiOZ0ltAFqDGLRLctQcPsFdnbpL5nkLkBruCraQ5KLmddtsMPm6OVnNOCq v9lIVRqA0B3Djb7h+SZ7CapqHfJ+nUEIGTxnOLZjDhPCReG/Sboo+ewBvKShqNmUXCfT IrNg== X-Forwarded-Encrypted: i=1; AJvYcCW/UNRiBIj7szETWxiPOaH2yuazF5DRIgZ+JySkdCVNM+q7xOq0rErh/RxUB3f/tBv4EEqBafAOznFxKX+n@lists.postgresql.org X-Gm-Message-State: AOJu0YyknoCNAf97xbdU+OClvsRBp5TfR0XlLcNb2hLV/yYXAIxlagqn ZoFcurBXL+qQJuWD6+WRnx2Qr4oOmaioM+HUEtIM129betEn9nXCUYwElptjkVwDjPc8JjCZLT9 XMffxaR95MS7E3xekZstsi4oXpLVXlQ== X-Gm-Gg: ASbGncsqx4o5BZfgwa/apPc97AYWIwp3pKkQnnVi2CY9lknP51nGss6dfAVzTBHyqJw DC8sislJ036mmbRH/3EI0DRJbuj3qg4b6yTIWUHASt4jF3gTtkK1Dhh91rE3OsVPs5sfwjyfRAI 8dkBiWNLc= X-Google-Smtp-Source: AGHT+IEnBGzezStPf30QIUGQwDBovlbMUD03OdF1YmKUG6/R5ZDfC1bLvQ0ZqSdyBcSoAqik14BtUPvt7AZsTtcJZQA= X-Received: by 2002:a17:907:d92:b0:ab7:dec1:b353 with SMTP id a640c23a62f3a-abc0de4ada6mr377137166b.49.1740172820289; Fri, 21 Feb 2025 13:20:20 -0800 (PST) MIME-Version: 1.0 References: <70bc1af0-6910-4f71-84ba-fa02095fe9ba@tantorlabs.com> <3212947.1739306803@sss.pgh.pa.us> <3365160.1739385615@sss.pgh.pa.us> <0e4c813a-18eb-41e2-8edb-89b78d43c82d@gmail.com> <01ec86c1-e04b-4cbe-b641-22cae8b87604@tantorlabs.com> <73e2440e-7d8b-4860-974d-931a93326d95@gmail.com> <7ab512ac-eed1-4fc8-9c5f-b42c0b0d313e@tantorlabs.com> In-Reply-To: <7ab512ac-eed1-4fc8-9c5f-b42c0b0d313e@tantorlabs.com> From: Robert Haas Date: Fri, 21 Feb 2025 16:20:08 -0500 X-Gm-Features: AWEUYZneHoIqLLe6pEzEu6W7j7qv_uL-jZ2T89wHK4FWM9qNycwjPycXdKz7xxQ Message-ID: Subject: Re: explain analyze rows=%.0f To: Ilia Evdokimov Cc: Andrei Lepikhov , pgsql-hackers@lists.postgresql.org, Tom Lane , Matheus Alcantara , Guillaume Lelarge , Daniel Gustafsson , Ibrar Ahmed , "Gregory Stark (as CFM)" , Amit Kapila , Justin Pryzby , Peter Geoghegan , vignesh C , "David G. Johnston" , Alena Rybakina 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 Wed, Feb 19, 2025 at 9:01=E2=80=AFAM Ilia Evdokimov wrote: > The idea of indicating to the user that different iterations produced > varying numbers of rows is quite reasonable. Most likely, this would > require adding a new boolean field to the Instrumentation structure, > which would track this information by comparing the rows value from the > current and previous iterations. Yep. > However, there is a major issue: this case would be quite difficult to > document clearly. Even with an example and explanatory text, users may > still be confused about why rows=3D100 means the same number of rows on > all iterations, while rows=3D100.00 indicates variation. Even if we > describe this in the documentation, a user seeing rows=3D100.00 will most > likely assume it represents an average of 100 rows per iteration and may > still not realize that the actual number of rows varied. I imagine this is a surmountable problem. > If we want to convey this information more clearly, we should consider a > more explicit approach. For example, instead of using a fractional > value, we could display the minimum and maximum row counts observed > during execution (e.g.,rows=3D10..20, formatting details could be > discussed). However, in my opinion, this discussion is beyond the scope > of this thread. I quite agree. I think we've spent too much time on this already; this idea was first proposed in 2009, and we just haven't gotten around to doing anything about it. Redesigning the feature a few more times (with an expanded scope) isn't going to make that better. So, I've committed v11-0001. I'm not altogether convinced that v11-0002 is necessary -- no portion of the documentation that it modifies is falsified by the committed patch. Maybe we can just call this one done for now and move on? --=20 Robert Haas EDB: http://www.enterprisedb.com