Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.8Mb
PDF (A4) - 39.9Mb
Man Pages (TGZ) - 257.9Kb
Man Pages (Zip) - 364.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  /  ...  /  sys Schema Object Index

30.4.1 sys Schema 对象索引

The following tables list sys schema objects and provide a short description of each one.

Table 30.1 sys Schema Tables and Triggers

Table or Trigger Name Description
sys_config sys schema configuration options table
sys_config_insert_set_user sys_config insert trigger
sys_config_update_set_user sys_config update trigger

Table 30.2 sys Schema Views

View Name Description Deprecated
host_summary, x$host_summary Statement activity, file I/O, and connections, grouped by host
host_summary_by_file_io, x$host_summary_by_file_io File I/O, grouped by host
host_summary_by_file_io_type, x$host_summary_by_file_io_type File I/O, grouped by host and event type
host_summary_by_stages, x$host_summary_by_stages Statement stages, grouped by host
host_summary_by_statement_latency, x$host_summary_by_statement_latency Statement statistics, grouped by host
host_summary_by_statement_type, x$host_summary_by_statement_type Statements executed, grouped by host and statement
innodb_buffer_stats_by_schema, x$innodb_buffer_stats_by_schema InnoDB buffer information, grouped by schema
innodb_buffer_stats_by_table, x$innodb_buffer_stats_by_table InnoDB buffer information, grouped by schema and table
innodb_lock_waits, x$innodb_lock_waits InnoDB lock information
io_by_thread_by_latency, x$io_by_thread_by_latency I/O consumers, grouped by thread
io_global_by_file_by_bytes, x$io_global_by_file_by_bytes Global I/O consumers, grouped by file and bytes
io_global_by_file_by_latency, x$io_global_by_file_by_latency Global I/O consumers, grouped by file and latency
io_global_by_wait_by_bytes, x$io_global_by_wait_by_bytes Global I/O consumers, grouped by bytes
io_global_by_wait_by_latency, x$io_global_by_wait_by_latency Global I/O consumers, grouped by latency
latest_file_io, x$latest_file_io Most recent I/O, grouped by file and thread
memory_by_host_by_current_bytes, x$memory_by_host_by_current_bytes Memory use, grouped by host
memory_by_thread_by_current_bytes, x$memory_by_thread_by_current_bytes Memory use, grouped by thread
memory_by_user_by_current_bytes, x$memory_by_user_by_current_bytes Memory use, grouped by user
memory_global_by_current_bytes, x$memory_global_by_current_bytes Memory use, grouped by allocation type
memory_global_total, x$memory_global_total Total memory use
metrics Server metrics
processlist, x$processlist Processlist information
ps_check_lost_instrumentation Variables that have lost instruments
schema_auto_increment_columns AUTO_INCREMENT column information
schema_index_statistics, x$schema_index_statistics Index statistics
schema_object_overview Types of objects within each schema
schema_redundant_indexes Duplicate or redundant indexes
schema_table_lock_waits, x$schema_table_lock_waits Sessions waiting for metadata locks
schema_table_statistics, x$schema_table_statistics Table statistics
schema_table_statistics_with_buffer, x$schema_table_statistics_with_buffer Table statistics, including InnoDB buffer pool statistics
schema_tables_with_full_table_scans, x$schema_tables_with_full_table_scans Tables being accessed with full scans
schema_unused_indexes Indexes not in active use
session, x$session Processlist information for user sessions
session_ssl_status Connection SSL information
statement_analysis, x$statement_analysis Statement aggregate statistics
statements_with_errors_or_warnings, x$statements_with_errors_or_warnings Statements that have produced errors or warnings
statements_with_full_table_scans, x$statements_with_full_table_scans Statements that have done full table scans
statements_with_runtimes_in_95th_percentile, x$statements_with_runtimes_in_95th_percentile Statements with highest average runtime
statements_with_sorting, x$statements_with_sorting Statements that performed sorts
statements_with_temp_tables, x$statements_with_temp_tables Statements that used temporary tables
user_summary, x$user_summary User statement and connection activity
user_summary_by_file_io, x$user_summary_by_file_io File I/O, grouped by user
user_summary_by_file_io_type, x$user_summary_by_file_io_type File I/O, grouped by user and event
user_summary_by_stages, x$user_summary_by_stages Stage events, grouped by user
user_summary_by_statement_latency, x$user_summary_by_statement_latency Statement statistics, grouped by user
user_summary_by_statement_type, x$user_summary_by_statement_type Statements executed, grouped by user and statement
version Current sys schema and MySQL server versions Yes
wait_classes_global_by_avg_latency, x$wait_classes_global_by_avg_latency Wait class average latency, grouped by event class
wait_classes_global_by_latency, x$wait_classes_global_by_latency Wait class total latency, grouped by event class
waits_by_host_by_latency, x$waits_by_host_by_latency Wait events, grouped by host and event
waits_by_user_by_latency, x$waits_by_user_by_latency Wait events, grouped by user and event
waits_global_by_latency, x$waits_global_by_latency Wait events, grouped by event
x$ps_digest_95th_percentile_by_avg_us Helper view for 95th-percentile views
x$ps_digest_avg_latency_distribution Helper view for 95th-percentile views
x$ps_schema_table_statistics_io Helper view for table-statistics views
x$schema_flattened_keys Helper view for schema_redundant_indexes

Table 30.3 sys Schema Stored Procedures

Procedure Name Description
create_synonym_db() Create synonym for schema
diagnostics() Collect system diagnostic information
execute_prepared_stmt() Execute prepared statement
ps_setup_disable_background_threads() Disable background thread instrumentation
ps_setup_disable_consumer() Disable consumers
ps_setup_disable_instrument() Disable instruments
ps_setup_disable_thread() Disable instrumentation for thread
ps_setup_enable_background_threads() Enable background thread instrumentation
ps_setup_enable_consumer() Enable consumers
ps_setup_enable_instrument() Enable instruments
ps_setup_enable_thread() Enable instrumentation for thread
ps_setup_reload_saved() Reload saved Performance Schema configuration
ps_setup_reset_to_default() Reset saved Performance Schema configuration
ps_setup_save() Save Performance Schema configuration
ps_setup_show_disabled() Display disabled Performance Schema configuration
ps_setup_show_disabled_consumers() Display disabled Performance Schema consumers
ps_setup_show_disabled_instruments() Display disabled Performance Schema instruments
ps_setup_show_enabled() Display enabled Performance Schema configuration
ps_setup_show_enabled_consumers() Display enabled Performance Schema consumers
ps_setup_show_enabled_instruments() Display enabled Performance Schema instruments
ps_statement_avg_latency_histogram() Display statement latency histogram
ps_trace_statement_digest() Trace Performance Schema instrumentation for digest
ps_trace_thread() Dump Performance Schema data for thread
ps_truncate_all_tables() Truncate Performance Schema summary tables
statement_performance_analyzer() Report of statements running on server
table_exists() Whether a table exists

Table 30.4 sys Schema Stored Functions

Function Name Description Deprecated
extract_schema_from_file_name() Extract schema name part of file name
extract_table_from_file_name() Extract table name part of file name
format_bytes() Convert byte count to value with units Yes
format_path() Replace directories in path name with symbolic system variable names
format_statement() Truncate long statement to fixed length
format_time() Convert picoseconds time to value with units Yes
list_add() Add item to list
list_drop() Remove item from list
ps_is_account_enabled() Whether Performance Schema instrumentation for account is enabled
ps_is_consumer_enabled() Whether Performance Schema consumer is enabled
ps_is_instrument_default_enabled() Whether Performance Schema instrument is enabled by default
ps_is_instrument_default_timed() Whether Performance Schema instrument is timed by default
ps_is_thread_instrumented() Whether Performance Schema instrumentation for connection ID is enabled
ps_thread_account() Account associated with Performance Schema thread ID
ps_thread_id() Performance Schema thread ID associated with connection ID Yes
ps_thread_stack() Event information for connection ID
ps_thread_trx_info() Transaction information for thread ID
quote_identifier() Quote string as identifier
sys_get_config() sys schema configuration option value
version_major() MySQL server major version number
version_minor() MySQL server minor version number
version_patch() MySQL server patch release version number