Overview

Used to view the properties of tables (including internal and external tables).

table_properties - 图1tip

This system table is supported from versions 2.1.6 and 3.0.2.

Database

information_schema

Table Information

Column NameTypeDescription
TABLE_CATALOGVARCHAR(64)Catalog to which the table belongs
TABLE_SCHEMAVARCHAR(64)Database to which the table belongs
TABLE_NAMEVARCHAR(64)Name of the table
PROPERTY_NAMESTRINGName of the property
PROPERTY_VALUESTRINGValue of the property

table_properties - 图2tip

For specific details on table properties, refer to the Create Table documentation.

Examples

  1. Query all table properties

    1. mysql> select * from information_schema.table_properties;
    2. +---------------+---------------+----------------------+------------------------------------------------+-------------------------+
    3. | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | PROPERTY_NAME | PROPERTY_VALUE |
    4. +---------------+---------------+----------------------+------------------------------------------------+-------------------------+
    5. ...
    6. | internal | test_database | test_table | min_load_replica_num | -1 |
    7. | internal | test_database | test_table | data_sort.col_num | 3 |
    8. | internal | test_database | test_table | group_commit_interval_ms | 10000 |
    9. | internal | test_database | test_table | data_sort.sort_type | LEXICAL |
    10. | internal | test_database | test_table | is_being_synced | false |
    11. | internal | test_database | test_table | binlog.enable | false |
    12. | internal | test_database | test_table | enable_mow_light_delete | false |
    13. | internal | test_database | test_table | binlog.ttl_seconds | 86400 |
    14. | internal | test_database | test_table | inverted_index_storage_format | V2 |
    15. | internal | test_database | test_table | time_series_compaction_empty_rowsets_threshold | 5 |
    16. | internal | test_database | test_table | default.replication_allocation | tag.location.default: 1 |
    17. | internal | test_database | test_table | time_series_compaction_level_threshold | 1 |
    18. | internal | test_database | test_table | time_series_compaction_time_threshold_seconds | 3600 |
    19. | internal | test_database | test_table | storage_format | V2 |
    20. | internal | test_database | test_table | store_row_column | false |
    21. | internal | test_database | test_table | light_schema_change | true |
    22. | internal | test_database | test_table | enable_unique_key_merge_on_write | false |
    23. | internal | test_database | test_table | in_memory | false |
    24. | internal | test_database | test_table | file_cache_ttl_seconds | 0 |
    25. | internal | test_database | test_table | group_commit_data_bytes | 134217728 |
    26. | internal | test_database | test_table | compaction_policy | size_based |
    27. | internal | test_database | test_table | _auto_bucket | false |
    28. | internal | test_database | test_table | binlog.max_history_nums | 9223372036854775807 |
    29. | internal | test_database | test_table | time_series_compaction_file_count_threshold | 2000 |
    30. | internal | test_database | test_table | skip_write_index_on_load | false |
    31. | internal | test_database | test_table | disable_auto_compaction | false |
    32. | internal | test_database | test_table | row_store_page_size | 16384 |
    33. | internal | test_database | test_table | time_series_compaction_goal_size_mbytes | 1024 |
    34. | internal | test_database | test_table | storage_medium | HDD |
    35. | internal | test_database | test_table | enable_single_replica_compaction | false |
    36. | internal | test_database | test_table | compression | LZ4F |
    37. | internal | test_database | test_table | binlog.max_bytes | 9223372036854775807 |
    38. +---------------+---------------+----------------------+------------------------------------------------+-------------------------+
  2. Query the default replication number

    1. mysql> select * from information_schema.table_properties where PROPERTY_NAME="default.replication_allocation";
    2. +---------------+----------------------+----------------------+--------------------------------+-------------------------+
    3. | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | PROPERTY_NAME | PROPERTY_VALUE |
    4. +---------------+----------------------+----------------------+--------------------------------+-------------------------+
    5. | internal | __internal_schema | column_statistics | default.replication_allocation | tag.location.default: 1 |
    6. | internal | __internal_schema | partition_statistics | default.replication_allocation | tag.location.default: 1 |
    7. | internal | __internal_schema | audit_log | default.replication_allocation | tag.location.default: 1 |
    8. | internal | test_database | test_table | default.replication_allocation | tag.location.default: 1 |
    9. +---------------+----------------------+----------------------+--------------------------------+-------------------------+