TIFLASH_SEGMENTS

TIFLASH_SEGMENTS - 图1

Warning

Do not use this table in production environments, as the fields of the table are unstable, and subject to change in new releases of TiDB, without prior notice.

TIFLASH_SEGMENTS - 图2

Note

This table is not available on TiDB Serverless clusters.

The TIFLASH_SEGMENTS table provides statistical information about data tables in TiFlash.

  1. USE information_schema;
  2. DESC tiflash_segments;
  1. +-------------------------------+-------------+------+------+---------+-------+
  2. | Field | Type | Null | Key | Default | Extra |
  3. +-------------------------------+-------------+------+------+---------+-------+
  4. | DATABASE | varchar(64) | YES | | NULL | |
  5. | TABLE | varchar(64) | YES | | NULL | |
  6. | TIDB_DATABASE | varchar(64) | YES | | NULL | |
  7. | TIDB_TABLE | varchar(64) | YES | | NULL | |
  8. | TABLE_ID | bigint(64) | YES | | NULL | |
  9. | IS_TOMBSTONE | bigint(64) | YES | | NULL | |
  10. | SEGMENT_ID | bigint(64) | YES | | NULL | |
  11. | RANGE | varchar(64) | YES | | NULL | |
  12. | EPOCH | bigint(64) | YES | | NULL | |
  13. | ROWS | bigint(64) | YES | | NULL | |
  14. | SIZE | bigint(64) | YES | | NULL | |
  15. | DELTA_RATE | double | YES | | NULL | |
  16. | DELTA_MEMTABLE_ROWS | bigint(64) | YES | | NULL | |
  17. | DELTA_MEMTABLE_SIZE | bigint(64) | YES | | NULL | |
  18. | DELTA_MEMTABLE_COLUMN_FILES | bigint(64) | YES | | NULL | |
  19. | DELTA_MEMTABLE_DELETE_RANGES | bigint(64) | YES | | NULL | |
  20. | DELTA_PERSISTED_PAGE_ID | bigint(64) | YES | | NULL | |
  21. | DELTA_PERSISTED_ROWS | bigint(64) | YES | | NULL | |
  22. | DELTA_PERSISTED_SIZE | bigint(64) | YES | | NULL | |
  23. | DELTA_PERSISTED_COLUMN_FILES | bigint(64) | YES | | NULL | |
  24. | DELTA_PERSISTED_DELETE_RANGES | bigint(64) | YES | | NULL | |
  25. | DELTA_CACHE_SIZE | bigint(64) | YES | | NULL | |
  26. | DELTA_INDEX_SIZE | bigint(64) | YES | | NULL | |
  27. | STABLE_PAGE_ID | bigint(64) | YES | | NULL | |
  28. | STABLE_ROWS | bigint(64) | YES | | NULL | |
  29. | STABLE_SIZE | bigint(64) | YES | | NULL | |
  30. | STABLE_DMFILES | bigint(64) | YES | | NULL | |
  31. | STABLE_DMFILES_ID_0 | bigint(64) | YES | | NULL | |
  32. | STABLE_DMFILES_ROWS | bigint(64) | YES | | NULL | |
  33. | STABLE_DMFILES_SIZE | bigint(64) | YES | | NULL | |
  34. | STABLE_DMFILES_SIZE_ON_DISK | bigint(64) | YES | | NULL | |
  35. | STABLE_DMFILES_PACKS | bigint(64) | YES | | NULL | |
  36. | TIFLASH_INSTANCE | varchar(64) | YES | | NULL | |
  37. +-------------------------------+-------------+------+------+---------+-------+
  38. 33 rows in set (0.00 sec)

Fields in the TIFLASH_SEGMENTS table are described as follows:

  • DATABASE: Database name in TiFlash. The segment belongs to a table in this database.
  • TABLE: Table name in TiFlash. The segment belongs to this table.
  • TIDB_DATABASE: Database name in TiDB. The segment belongs to a table in this database.
  • TIDB_TABLE: Table name in TiDB. The segment belongs to this table.
  • TABLE_ID: The internal ID of the table to which the segment belongs. This ID is unique within a TiDB cluster.
  • IS_TOMBSTONE: Indicates whether the table the segment belongs to can be recycled. 1 indicates that the table can be recycled. 0 indicates that the table is in a normal state.
  • SEGMENT_ID: Segment ID, which is unique within a table.
  • RANGE: The range of data that the segment contains.
  • EPOCH: The updated version of the segment. The version number of each segment increases monotonically.
  • ROWS: The total number of rows in the segment.
  • SIZE: The total size of the segment data (in bytes).
  • DELTA_RATE: The ratio of the total number of rows in the Delta layer to that in the segment.
  • DELTA_MEMTABLE_ROWS: The total number of cached rows in the Delta layer.
  • DELTA_MEMTABLE_SIZE: The total size of the data cached in the Delta layer (in bytes).
  • DELTA_MEMTABLE_COLUMN_FILES: The number of Column Files cached in the Delta layer.
  • DELTA_MEMTABLE_DELETE_RANGES: The number of Delete Ranges cached in the Delta layer.
  • DELTA_PERSISTED_PAGE_ID: The ID of the data stored on a disk in the Delta layer.
  • DELTA_PERSISTED_ROWS: The total number of rows of persisted data in the Delta layer.
  • DELTA_PERSISTED_SIZE: The total size of the persisted data in the Delta layer (in bytes).
  • DELTA_PERSISTED_COLUMN_FILES: The number of persisted Column Files in the Delta layer.
  • DELTA_PERSISTED_DELETE_RANGES: The number of persisted Delete Ranges in the Delta layer.
  • DELTA_CACHE_SIZE: The size of the cache in the Delta layer (in bytes).
  • DELTA_INDEX_SIZE: The size of the indexes in the Delta layer (in bytes).
  • STABLE_PAGE_ID: The disk storage ID of the data in the Stable layer.
  • STABLE_ROWS: The total number of rows in the Stable layer.
  • STABLE_SIZE: The total size of the data in the Stable layer (in bytes).
  • STABLE_DMFILES: The number of DMFiles in the Stable layer.
  • STABLE_DMFILES_ID_0: The disk storage ID of the first DMFile in the Stable layer.
  • STABLE_DMFILES_ROWS: The total number of rows in the DMFile in the Stable layer.
  • STABLE_DMFILES_SIZE: The total size of the data in the DMFile in the Stable layer (in bytes).
  • STABLE_DMFILES_SIZE_ON_DISK: The disk space occupied by the DMFile in the Stable layer (in bytes).
  • STABLE_DMFILES_PACKS: The number of Packs in the DMFile in the Stable layer.
  • TIFLASH_INSTANCE: The address of the TiFlash instance.