Home Explore Blog CI



postgresql

51th chunk of `doc/src/sgml/monitoring.sgml`
652a990fb1781c3973e1c22c90fa61b4328579a0faf7e0fd0000000100000fa0
 </indexterm>

  <para>
   The <structname>pg_statio_all_tables</structname> view will contain
   one row for each table in the current database (including TOAST
   tables), showing statistics about I/O on that specific table. The
   <structname>pg_statio_user_tables</structname> and
   <structname>pg_statio_sys_tables</structname> views
   contain the same information,
   but filtered to only show user and system tables respectively.
  </para>

  <table id="pg-statio-all-tables-view" xreflabel="pg_statio_all_tables">
   <title><structname>pg_statio_all_tables</structname> View</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>
      <para>
       Description
      </para></entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relid</structfield> <type>oid</type>
      </para>
      <para>
       OID of a table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>schemaname</structfield> <type>name</type>
      </para>
      <para>
       Name of the schema that this table is in
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relname</structfield> <type>name</type>
      </para>
      <para>
       Name of this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>heap_blks_read</structfield> <type>bigint</type>
      </para>
      <para>
       Number of disk blocks read from this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>heap_blks_hit</structfield> <type>bigint</type>
      </para>
      <para>
       Number of buffer hits in this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>idx_blks_read</structfield> <type>bigint</type>
      </para>
      <para>
       Number of disk blocks read from all indexes on this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>idx_blks_hit</structfield> <type>bigint</type>
      </para>
      <para>
       Number of buffer hits in all indexes on this table
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>toast_blks_read</structfield> <type>bigint</type>
      </para>
      <para>
       Number of disk blocks read from this table's TOAST table (if any)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>toast_blks_hit</structfield> <type>bigint</type>
      </para>
      <para>
       Number of buffer hits in this table's TOAST table (if any)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tidx_blks_read</structfield> <type>bigint</type>
      </para>
      <para>
       Number of disk blocks read from this table's TOAST table indexes (if any)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>tidx_blks_hit</structfield> <type>bigint</type>
      </para>
      <para>
       Number of buffer hits in this table's TOAST table indexes (if any)
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect2>

 <sect2 id="monitoring-pg-statio-all-indexes-view">
  <title><structname>pg_statio_all_indexes</structname></title>

  <indexterm>
   <primary>pg_statio_all_indexes</primary>
  </indexterm>

Title: pg_statio_all_tables View and Column Descriptions
Summary
This section details the `pg_statio_all_tables` view, which provides I/O statistics for tables in the current database. It lists and describes each column in the view, including `relid`, `schemaname`, `relname`, `heap_blks_read`, `heap_blks_hit`, `idx_blks_read`, `idx_blks_hit`, `toast_blks_read`, `toast_blks_hit`, `tidx_blks_read`, and `tidx_blks_hit`. It also mentions that `pg_statio_user_tables` and `pg_statio_sys_tables` views contain the same information, filtered for user and system tables respectively. The next section introduces `pg_statio_all_indexes`.