Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhSkh-0001sK-TF for pgsql-docs@arkaria.postgresql.org; Fri, 14 May 2021 08:00:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhSkg-0001QJ-CJ for pgsql-docs@arkaria.postgresql.org; Fri, 14 May 2021 08:00:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhSkg-0001QA-6J for pgsql-docs@lists.postgresql.org; Fri, 14 May 2021 08:00:54 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhSkc-0000SW-2U for pgsql-docs@lists.postgresql.org; Fri, 14 May 2021 08:00:53 +0000 Received: from [192.168.0.6] (124-144-135-173.rev.home.ne.jp [124.144.135.173]) by oss.nttdata.com (Postfix) with ESMTPSA id 13E3A604BF for ; Fri, 14 May 2021 17:00:46 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.2 at oss.nttdata.com To: pgsql-docs@lists.postgresql.org From: Masahiro Ikeda Subject: more detailed description of tup_returned and tup_fetched Message-ID: <9eeeccdb-5dd7-90f9-2807-a4b5d2b76ca3@oss.nttdata.com> Date: Fri, 14 May 2021 17:00:45 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6E952A63D12AA5786D65AF7D" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------6E952A63D12AA5786D65AF7D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, I worried the difference between "tup_returned" and "tup_fetched" in pg_stat_database. I assumed that "tup_returned" means the number of tuples that returned to clients. Of course, this is wrong. So, why don't you describe in more detail? If my understanding is right, they correspond to "seq_tup_read" and "idx_tup_fetch" in pg_stat_all_tables. Regards, -- Masahiro Ikeda NTT DATA CORPORATION --------------6E952A63D12AA5786D65AF7D Content-Type: text/x-patch; charset=UTF-8; name="add-more-detailed-description-of-tup_returned-and-tup_fetched.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="add-more-detailed-description-of-tup_returned-and-tup_fetche"; filename*1="d.patch" diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index dcbb10fb6f..09a22a43ac 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3712,7 +3712,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i tup_returned bigint - Number of rows returned by queries in this database + Number of live rows returned by sequential scans of queries in this database @@ -3721,7 +3721,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i tup_fetched bigint - Number of rows fetched by queries in this database + Number of live rows fetched by index scan of queries in this database --------------6E952A63D12AA5786D65AF7D--