SHOW [GLOBAL|SESSION] VARIABLES

SHOW [GLOBAL|SESSION] VARIABLES 语句用于显示 GLOBALSESSION 范围的变量列表。如果未指定范围,则应用默认范围 SESSION

语法图

ShowStmt:

ShowStmt

ShowTargetFilterable:

ShowTargetFilterable

GlobalScope:

GlobalScope

示例

  1. SHOW GLOBAL VARIABLES LIKE 'tidb%';
  1. +-------------------------------------+---------------+
  2. | Variable_name | Value |
  3. +-------------------------------------+---------------+
  4. | tidb_retry_limit | 10 |
  5. | tidb_enable_streaming | 0 |
  6. | tidb_hashagg_final_concurrency | 4 |
  7. | tidb_disable_txn_auto_retry | 1 |
  8. | tidb_mem_quota_query | 34359738368 |
  9. | tidb_skip_isolation_level_check | 0 |
  10. | tidb_ddl_reorg_batch_size | 1024 |
  11. | tidb_constraint_check_in_place | 0 |
  12. | tidb_current_ts | 0 |
  13. | tidb_opt_insubq_to_join_and_agg | 1 |
  14. | tidb_enable_window_function | 1 |
  15. | tidb_ddl_error_count_limit | 512 |
  16. | tidb_checksum_table_concurrency | 4 |
  17. | tidb_config | |
  18. | tidb_batch_insert | 0 |
  19. | tidb_opt_join_reorder_threshold | 0 |
  20. | tidb_auto_analyze_end_time | 23:59 +0000 |
  21. | tidb_index_lookup_size | 20000 |
  22. | tidb_projection_concurrency | 4 |
  23. | tidb_opt_correlation_threshold | 0.9 |
  24. | tidb_enable_table_partition | auto |
  25. | tidb_wait_split_region_timeout | 300 |
  26. | tidb_skip_utf8_check | 0 |
  27. | tidb_dml_batch_size | 20000 |
  28. | tidb_backoff_weight | 2 |
  29. | tidb_txn_mode | |
  30. | tidb_mem_quota_indexlookupjoin | 34359738368 |
  31. | tidb_hashagg_partial_concurrency | 4 |
  32. | tidb_enable_radix_join | 0 |
  33. | tidb_mem_quota_topn | 34359738368 |
  34. | tidb_hash_join_concurrency | 5 |
  35. | tidb_max_chunk_size | 1024 |
  36. | tidb_mem_quota_indexlookupreader | 34359738368 |
  37. | tidb_expensive_query_time_threshold | 60 |
  38. | tidb_enable_cascades_planner | 0 |
  39. | tidb_mem_quota_mergejoin | 34359738368 |
  40. | tidb_auto_analyze_ratio | 0.5 |
  41. | tidb_index_lookup_concurrency | 4 |
  42. | tidb_force_priority | NO_PRIORITY |
  43. | tidb_ddl_reorg_priority | PRIORITY_LOW |
  44. | tidb_index_lookup_join_concurrency | 4 |
  45. | tidb_index_join_batch_size | 25000 |
  46. | tidb_index_serial_scan_concurrency | 1 |
  47. | tidb_mem_quota_nestedloopapply | 34359738368 |
  48. | tidb_auto_analyze_start_time | 00:00 +0000 |
  49. | tidb_snapshot | |
  50. | tidb_low_resolution_tso | 0 |
  51. | tidb_batch_commit | 0 |
  52. | tidb_init_chunk_size | 32 |
  53. | tidb_build_stats_concurrency | 4 |
  54. | tidb_backoff_lock_fast | 100 |
  55. | tidb_optimizer_selectivity_level | 0 |
  56. | tidb_batch_delete | 0 |
  57. | tidb_distsql_scan_concurrency | 15 |
  58. | tidb_scatter_region | 0 |
  59. | tidb_opt_correlation_exp_factor | 1 |
  60. | tidb_ddl_reorg_worker_cnt | 16 |
  61. | tidb_wait_split_region_finish | 1 |
  62. | tidb_mem_quota_sort | 34359738368 |
  63. | tidb_general_log | 0 |
  64. | tidb_opt_write_row_id | 0 |
  65. | tidb_check_mb4_value_in_utf8 | 1 |
  66. | tidb_enable_fast_analyze | 0 |
  67. | tidb_slow_query_file | tidb-slow.log |
  68. | tidb_slow_log_threshold | 300 |
  69. | tidb_opt_agg_push_down | 0 |
  70. | tidb_mem_quota_hashjoin | 34359738368 |
  71. | tidb_query_log_max_len | 2048 |
  72. +-------------------------------------+---------------+
  73. 68 rows in set (0.01 sec)
  1. SHOW GLOBAL VARIABLES LIKE 'time_zone%';
  1. +---------------+--------+
  2. | Variable_name | Value |
  3. +---------------+--------+
  4. | time_zone | SYSTEM |
  5. +---------------+--------+
  6. 1 row in set (0.00 sec)

MySQL 兼容性

SHOW [GLOBAL|SESSION] VARIABLES 语句与 MySQL 完全兼容。如有任何兼容性差异,请在 GitHub 上提交 issue

另请参阅