System tables

更新时间:
复制 MD 格式

AnalyticDB for MySQL exposes a set of system tables in the INFORMATION_SCHEMA database. Query these tables to monitor connections, inspect cluster configuration, track partition statistics, and diagnose import and BUILD jobs.

kepler_connection_info_merged

Tracks active connections grouped by username and client IP address. Use this table to identify which clients are connected and how long their connections have been active. For a full walkthrough, see View connection information.

FieldDescription
schemaDatabase name
connection_idConnection ID
userUsername used to connect to the cluster
access_ipClient IP address
ip_portIP address and port of the cluster's access node
create_timeTime when the connection was established
last_active_timeTime when the connection was last active

Example: Count connections per username.

SELECT user, COUNT(*) AS connection_count
FROM information_schema.kepler_connection_info_merged
GROUP BY user
ORDER BY connection_count DESC;

kepler_persist_plan_summary

Lists all query patterns that have a persist plan (hint) configured. Use this table to audit which patterns are affected by plan pinning and how often each pattern is matched. For background, see Persist plan and query blocker.

FieldDescription
sqlSQL pattern
hintsHint content applied to the pattern
_sql_cntNumber of statements that matched the pattern
hit_appliedNumber of times the persist plan was applied since it was created
create_timeTime when the persist plan was created
update_timeTime when the persist plan was last modified

Example: List all patterns ordered by match frequency.

SELECT sql, hints, _sql_cnt, hit_applied
FROM information_schema.kepler_persist_plan_summary
ORDER BY _sql_cnt DESC;

kepler_meta_shards

Queries the number of shards in an AnalyticDB for MySQL cluster. For quota details, see the Quota limits section of the Limits topic.

Example: Get the total shard count.

SELECT count(1) FROM information_schema.kepler_meta_shards;

kepler_partitions

Returns storage and row statistics for every partition across all tables. Use this table to identify large or unbalanced partitions and to verify partition creation. For a usage example, see the Schema design topic.

FieldDescription
schema_nameDatabase name
table_nameTable name
partition_idPartition ID
row_countNumber of rows in the partition
data_sizeTotal partition size, in bytes
detail_sizeData size, in bytes
index_sizeIndex size, in bytes
pk_sizePrimary key size, in bytes
local_data_sizeHot data size, in bytes
remote_data_sizeCold data size, in bytes
create_timeTime when the partition was created
last_accessTime when the partition was last accessed

Example: Get the 10 largest partitions for a specific table.

SELECT partition_id, row_count, data_size
FROM information_schema.kepler_partitions
WHERE schema_name = '<your_database>' AND table_name = '<your_table>'
ORDER BY data_size DESC
LIMIT 10;

kepler_meta_configs

Lists all configuration parameters set on the cluster, including their current values and descriptions. Use this table to inspect settings such as analyzer configurations for full-text indexes. For a usage example, see Analyzers for full-text indexes.

FieldDescription
keyConfiguration parameter name
valueConfiguration parameter value
descriptionDescription of the configuration parameter
create_timeTime when the configuration parameter was set
update_timeTime when the configuration parameter was last updated

Example: List configuration parameters whose names contain a keyword.

SELECT key, value, description
FROM information_schema.kepler_meta_configs
WHERE key LIKE '%analyzer%';

kepler_meta_build_task

Returns BUILD job records from the past three days. Use this table to check whether an index build has completed or to diagnose failures.

Note: This table only retains records from the last three days.

For guidance on interpreting BUILD job status, see Query the status of a BUILD job.

FieldDescription
schema_nameDatabase name
table_nameTable name
statusBUILD job status
create_timeTime when the BUILD job was created

Example: Check all BUILD jobs for a specific table.

SELECT schema_name, table_name, status, create_time
FROM information_schema.kepler_meta_build_task
WHERE schema_name = '<your_database>' AND table_name = '<your_table>'
ORDER BY create_time DESC;

kepler_meta_async_jobs

Returns information about import jobs on the cluster. Use this table to check job status and diagnose import failures. For a usage example, see Import and export.

FieldDescription
exec_job_idImport job ID
schema_nameDatabase name
user_nameUsername that submitted the import job
definitionImport job definition
statusImport job status
process_rowsNumber of rows processed
fail_msgFailure message, if the job failed
create_timeTime when the import job was created
start_timeTime when the import job started
update_timeTime when the import job record was last updated

Example: List all import jobs currently running.

SELECT exec_job_id, schema_name, user_name, process_rows, create_time
FROM information_schema.kepler_meta_async_jobs
WHERE status = 'RUNNING'
ORDER BY create_time DESC;

kepler_cache_table_status

Returns the status of all cache tables in the cluster, including size, usage, and timestamps. Use this table to determine whether a cache table is still in use before dropping it. For background, see Cache tables.

FieldDescription
schema_nameDatabase name
table_nameCache table name
cache_idUnique ID of the cache table
data_sizeSize of the cache table, in bytes
occupiedNumber of connections or queries currently using the cache table
deletingWhether the cache table is being deleted
create_timeTime when the cache table was created
visit_timeTime when the cache table was last accessed
update_timeTime when the cache table was last updated

Example: Find cache tables that are large but have not been accessed recently.

SELECT schema_name, table_name, data_size, visit_time
FROM information_schema.kepler_cache_table_status
ORDER BY data_size DESC;