Logo
数据字典

数据字典 #

shardingsphere 库 #

shardingsphere 库为 SphereEx-DBPlusEngine 的数据字典库,用于查看 SphereEx-DBPlusEngine 的字典信息。

sharding_table_statistics 表 #

shardingsphere 库中的 sharding_table_statistics 表是 DBPlusEngine 的数据字典表,用于查询分片表的统计信息,数据来源是底层 DB 的统计信息表,收集方式为,内置定时任务,频率为30秒一次,用户无法干预。

如下为查询示例

mysql>  select * from shardingsphere.sharding_table_statistics;
+----+---------------------+------------------+----------------------+-------------------+-----------+-------+
| id | logic_database_name | logic_table_name | actual_database_name | actual_table_name | row_count | size  |
+----+---------------------+------------------+----------------------+-------------------+-----------+-------+
|  3 | test                | t_order          | ds0                  | t_order_2         |         1 | 16384 |
|  4 | test                | t_order          | ds1                  | t_order_3         |         1 | 16384 |
|  2 | test                | t_order          | ds1                  | t_order_1         |         1 | 16384 |
|  1 | test                | t_order          | ds0                  | t_order_0         |         1 | 16384 |
+----+---------------------+------------------+----------------------+-------------------+-----------+-------+
4 rows in set (0.05 sec)

对数据库数据字典的兼容性 #

SphereEx-DBPlusEngine 提供了对接数据库元数据的兼容能力,目前已实现对数据库的兼容情况。

说明:只支持空查询,用于兼容各个数据库客户端。

对 MySQL 元数据兼容情况如下

information_schematables
views
columns
mysqldb
performance_schemaaccounts
sys
sys_config

对 PG 兼容情况如下

information_schematables
views
columns
pg_catalogpg_tablespace
pg_database