Skip to content

sys.table_info

This view reports the current state of database tables with respect to background operations that have been run or might need to be run. See also sys.table_storage.

Column NameData TypeDescription
table_idbigintUnique table ID; join key to sys.table. Some internal yb_query* tables with four-digit IDs are tracked by this view; you can filter them out in queries: where table_id>10000;
rows_rowstorebigintNumber of rows that have yet to be flushed from the row store to the column store. See also the rows_columnstore column in the sys.table_storage view.
modified_rows_statisticsbigintNumber of rows that were inserted or deleted since the last ANALYZE operation.
last_analyzedtimestamptzWhen statistics were last updated (via an ANALYZE operation).

Example

This query joins the sys.table_info view to the sys.table and sys.schema views.

premdb=# select sct.name, sti.* from sys.table_info sti, sys.table sct, sys.schema sch 
where (sti.table_id=sct.table_id) and (sct.schema_id=sch.schema_id) and (sct.database_id=sch.database_id) 
and sct.table_id>10000;
   name   | table_id | rows_rowstore | modified_rows_statistics |         last_analyzed         
----------+----------+---------------+--------------------------+-------------------------------
 awayteam |    17560 |        [NULL] |                   [NULL] | 2020-10-27 12:35:08.986892-07
 hometeam |    17556 |        [NULL] |                   [NULL] | 2020-10-27 12:35:09.147433-07
 team     |    17552 |        [NULL] |                   [NULL] | 2020-10-27 13:10:40.714623-07
 season   |    17548 |        [NULL] |                   [NULL] | 2020-10-27 13:10:48.675918-07
 match    |    17564 |        [NULL] |                   [NULL] | 2020-10-27 15:14:28.525819-07
(5 rows)

Parent topic:System Views