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 view.

premdb=# select sct.name, sti.* from sys.table_info sti, sys.table sct where sti.table_id=sct.table_id and sct.table_id>10000;
    name      | table_id | rows_rowstore | modified_rows_statistics |         last_analyzed         
---------------+----------+---------------+--------------------------+-------------------------------
 match         |    16409 |             0 |                          | 2018-02-05 11:48:01.469324-08
 newmatchstats |    16412 |             0 |                          | 2018-02-05 11:50:48.08885-08
 team          |    16403 |             0 |                          | 2018-02-05 11:48:05.93531-08
 awayteam      |    16407 |             0 |                          | 2018-02-05 11:24:08.676071-08
 hometeam      |    16405 |             0 |                          | 2018-02-05 11:24:10.154216-08
 season        |    16401 |             0 |                          | 2018-02-05 11:47:54.435389-08
(6 rows)

Parent topic:System Views