性能模式参数可以在服务器启动时通过命令行或选项文件来指定,以配置性能模式的仪表和消费者。在许多情况下,也可以进行运行时配置(参见 第 29.4 节,“性能模式运行时配置”),但当运行时配置太晚无法影响在启动过程中已经初始化的仪表时,必须使用启动配置。Performance Schema parameters can be specified at server startup on the command line or in option files to configure Performance Schema instruments and consumers. Runtime configuration is also possible in many cases (see Section 29.4, “Performance Schema Runtime Configuration”), but startup configuration must be used when runtime configuration is too late to affect instruments that have already been initialized during the startup process.
Performance Schema 的消费者和工具可以在启动时使用以下语法进行配置。欲了解更多详细信息,请参阅 第 29.3 节,“Performance Schema 启动配置”。Performance Schema consumers and instruments can be configured at startup using the following syntax. For additional details, see Section 29.3, “Performance Schema Startup Configuration”.
--performance-schema-consumer-consumer_name=value配置 Performance Schema 消费者。
setup_consumers表中的消费者名称使用下划线,但对于在启动时设置的消费者,名称中的短横线和下划线是等效的。配置单个消费者的选项在本节后面详细说明。Configure a Performance Schema consumer. Consumer names in thesetup_consumerstable use underscores, but for consumers set at startup, dashes and underscores within the name are equivalent. Options for configuring individual consumers are detailed later in this section.--performance-schema-instrument=instrument_name=value配置 Performance Schema 仪表。名称可以作为模式给出,以配置与该模式匹配的仪表。Configure a Performance Schema instrument. The name may be given as a pattern to configure instruments that match the pattern.
以下项目用于配置单个消费者:The following items configure individual consumers:
--performance-schema-consumer-events-stages-current=value--performance-schema-consumer-events-stages-current=value配置
events-stages-current消费者。Configure theevents-stages-currentconsumer.--performance-schema-consumer-events-stages-history=value--performance-schema-consumer-events-stages-history=value配置
events-stages-history消费者。Configure theevents-stages-historyconsumer.--performance-schema-consumer-events-stages-history-long=value配置
events-stages-history-long消费者。Configure theevents-stages-history-longconsumer.--performance-schema-consumer-events-statements-cpu=value配置
events-statements-cpu消费者。Configure theevents-statements-cpuconsumer.--performance-schema-consumer-events-statements-current=value--performance-schema-consumer-events-statements-current=value配置
events-statements-current消费者。Configure theevents-statements-currentconsumer.--performance-schema-consumer-events-statements-history=value--performance-schema-consumer-events-statements-history=value配置
events-statements-history消费者。Configure theevents-statements-historyconsumer.--performance-schema-consumer-events-statements-history-long=value--performance-schema-consumer-events-statements-history-long=value配置
events-statements-history-long消费者。Configure theevents-statements-history-longconsumer.--performance-schema-consumer-events-transactions-current=value--performance-schema-consumer-events-transactions-current=value配置 Performance Schema
events-transactions-current消费者。Configure the Performance Schemaevents-transactions-currentconsumer.--performance-schema-consumer-events-transactions-history=value配置 Performance Schema
events-transactions-history消费者。Configure the Performance Schemaevents-transactions-historyconsumer.--performance-schema-consumer-events-transactions-history-long=value配置 Performance Schema
events-transactions-history-long消费者。Configure the Performance Schemaevents-transactions-history-longconsumer.--performance-schema-consumer-events-waits-current=value--performance-schema-consumer-events-waits-current=value配置
events-waits-current消费者。Configure theevents-waits-currentconsumer.--performance-schema-consumer-events-waits-history=value--performance-schema-consumer-events-waits-history=value配置
events-waits-history消费者。Configure theevents-waits-historyconsumer.--performance-schema-consumer-events-waits-history-long=value--performance-schema-consumer-events-waits-history-long=value配置
events-waits-history-long消费者。Configure theevents-waits-history-longconsumer.--performance-schema-consumer-global-instrumentation=value--performance-schema-consumer-global-instrumentation=value配置
global-instrumentation消费者。Configure theglobal-instrumentationconsumer.--performance-schema-consumer-statements-digest=value配置
statements-digest消费者。Configure thestatements-digestconsumer.--performance-schema-consumer-thread-instrumentation=value配置
thread-instrumentation消费者。Configure thethread-instrumentationconsumer.