MySQL 伺服器版本參考  /  sys Schema 物件

第 6 章 sys Schema 物件

下表顯示 MySQL 伺服器中所有可用的 sys schema 物件。每個表格都包含以下欄位

  • 名稱:項目名稱。

  • 引入版本:引入該項目的版本。此欄位僅在適用於某些項目時才會顯示。

  • 已棄用:棄用該項目的版本。此欄位僅在適用於某些項目時才會顯示。

  • 已移除:移除該項目的版本。此欄位僅在適用於某些項目時才會顯示。

  • 該項目在對應的 MySQL 伺服器發行系列中是否可用。如果可以取得更多資訊,指示器會連結到主參考手冊中的項目說明。

    如果項目曾經出現在表格中顯示的任何系列中,則該項目在表格中會有一列。針對給定系列顯示的值表示該項目在該系列中的可用性

    • 是:該項目在所有可供生產使用的正式發行 (GA) 版本中都可用。對於尚未達到 GA 狀態的系列,是表示該項目在最近發布的 pre-GA 版本中可用。

    • 部分:該項目在某些 GA 版本中可用。如果該項目是在第一個 GA 版本之後引入,或者從某些 GA 版本中移除,就會出現這種情況。

    • 空白:該項目在任何 GA 版本中都不可用。它要么不存在於該系列中,要么存在於 pre-GA 版本中,但在該系列達到 GA 狀態之前被移除。

表 6.1 sys Schema 表格與觸發器參考

表格或觸發器名稱 5.7 8.0 8.1 8.2 8.3 8.4
sys_config
sys_config_insert_set_user
sys_config_update_set_user

表 6.2 sys Schema 檢視參考

檢視名稱 已棄用 5.7 8.0 8.1 8.2 8.3 8.4
host_summary, x$host_summary
host_summary_by_file_io, x$host_summary_by_file_io
host_summary_by_file_io_type, x$host_summary_by_file_io_type
host_summary_by_stages, x$host_summary_by_stages
host_summary_by_statement_latency, x$host_summary_by_statement_latency
host_summary_by_statement_type, x$host_summary_by_statement_type
innodb_buffer_stats_by_schema, x$innodb_buffer_stats_by_schema
innodb_buffer_stats_by_table, x$innodb_buffer_stats_by_table
innodb_lock_waits, x$innodb_lock_waits
io_by_thread_by_latency, x$io_by_thread_by_latency
io_global_by_file_by_bytes, x$io_global_by_file_by_bytes
io_global_by_file_by_latency, x$io_global_by_file_by_latency
io_global_by_wait_by_bytes, x$io_global_by_wait_by_bytes
io_global_by_wait_by_latency, x$io_global_by_wait_by_latency
latest_file_io, x$latest_file_io
memory_by_host_by_current_bytes, x$memory_by_host_by_current_bytes
memory_by_thread_by_current_bytes, x$memory_by_thread_by_current_bytes
memory_by_user_by_current_bytes, x$memory_by_user_by_current_bytes
memory_global_by_current_bytes, x$memory_global_by_current_bytes
memory_global_total, x$memory_global_total
metrics
processlist, x$processlist
ps_check_lost_instrumentation
schema_auto_increment_columns
schema_index_statistics, x$schema_index_statistics
schema_object_overview
schema_redundant_indexes
schema_table_lock_waits, x$schema_table_lock_waits
schema_table_statistics, x$schema_table_statistics
schema_table_statistics_with_buffer, x$schema_table_statistics_with_buffer
schema_tables_with_full_table_scans, x$schema_tables_with_full_table_scans
schema_unused_indexes
session, x$session
session_ssl_status
statement_analysis, x$statement_analysis
statements_with_errors_or_warnings, x$statements_with_errors_or_warnings
statements_with_full_table_scans, x$statements_with_full_table_scans
statements_with_runtimes_in_95th_percentile, x$statements_with_runtimes_in_95th_percentile
statements_with_sorting, x$statements_with_sorting
statements_with_temp_tables, x$statements_with_temp_tables
user_summary, x$user_summary
user_summary_by_file_io, x$user_summary_by_file_io
user_summary_by_file_io_type, x$user_summary_by_file_io_type
user_summary_by_stages, x$user_summary_by_stages
user_summary_by_statement_latency, x$user_summary_by_statement_latency
user_summary_by_statement_type, x$user_summary_by_statement_type
version 5.7.28, 8.0.18
wait_classes_global_by_avg_latency, x$wait_classes_global_by_avg_latency
wait_classes_global_by_latency, x$wait_classes_global_by_latency
waits_by_host_by_latency, x$waits_by_host_by_latency
waits_by_user_by_latency, x$waits_by_user_by_latency
waits_global_by_latency, x$waits_global_by_latency
x$ps_digest_95th_percentile_by_avg_us
x$ps_digest_avg_latency_distribution
x$ps_schema_table_statistics_io
x$schema_flattened_keys

表 6.3 sys Schema 預存程序參考

預存程序名稱 5.7 8.0 8.1 8.2 8.3 8.4
create_synonym_db()
diagnostics()
execute_prepared_stmt()
ps_setup_disable_background_threads()
ps_setup_disable_consumer()
ps_setup_disable_instrument()
ps_setup_disable_thread()
ps_setup_enable_background_threads()
ps_setup_enable_consumer()
ps_setup_enable_instrument()
ps_setup_enable_thread()
ps_setup_reload_saved()
ps_setup_reset_to_default()
ps_setup_save()
ps_setup_show_disabled()
ps_setup_show_disabled_consumers()
ps_setup_show_disabled_instruments()
ps_setup_show_enabled()
ps_setup_show_enabled_consumers()
ps_setup_show_enabled_instruments()
ps_statement_avg_latency_histogram()
ps_trace_statement_digest()
ps_trace_thread()
ps_truncate_all_tables()
statement_performance_analyzer()
table_exists()

表 6.4 sys Schema 預存函式參考

預存函式名稱 引入版本 已棄用 5.7 8.0 8.1 8.2 8.3 8.4
extract_schema_from_file_name()
extract_table_from_file_name()
format_bytes() 8.0.16
format_path()
format_statement()
format_time() 8.0.16
list_add()
list_drop()
ps_is_account_enabled()
ps_is_consumer_enabled()
ps_is_instrument_default_enabled()
ps_is_instrument_default_timed()
ps_is_thread_instrumented()
ps_thread_account()
ps_thread_id() 8.0.16
ps_thread_stack()
ps_thread_trx_info()
quote_identifier() 5.7.14 部分
sys_get_config()
version_major()
version_minor()
version_patch()