Performance Schema Build Configuration The Performance Schema uses collected events to update tables in the  performance_schema database, which act as “consumers”  of event information. The  setup_consumers  table lists the available consumers and which are enabled: To control whether the Performance Schema maintains a consumer as a destination for event information, set its  ENABLED  value. For more information about the setup tables and how to use them to control event collection, see Section 27.4.2, “Performance Schema Event Filtering” . There are some miscellaneous tables that do not fall into any of the previous groups. For example, performance_timers  lists the available event timers and their characteristics. For information about timers, see Section 27.4.1, “Performance Schema Event Timing” . The Performance Schema is mandatory and always compiled in. It is possible to exclude certain parts of the Performance Schema instrumentation. For example, to exclude stage and statement instrumentation, do this: For more information, see the descriptions of the  DISABLE_PSI_ XXX CMake  options in Section 2.9.7, “MySQL Source-Configuration Options” . If you install MySQL over a previous installation that was configured without the Performance Schema (or with an older version of the Performance Schema that has missing or out-of-date tables). One indication of this issue is the presence of messages such as the following in the error log: To correct that problem, perform the MySQL upgrade procedure. See Section 2.11, “Upgrading MySQL” . Because the Performance Schema is configured into the server at build time, a row for PERFORMANCE_SCHEMA  appears in the output from  SHOW ENGINES . This means that the Performance 4901 shell>  cmake . \ -DDISABLE_PSI_STAGE=1 \ -DDISABLE_PSI_STATEMENT=1 [ERROR] Native table ’performance_schema’.’events_waits_history’ has the wrong structure [ERROR] Native table ’performance_schema’.’events_waits_history_long’ has the wrong structure ... mysql>  SELECT * FROM performance_schema.setup_consumers; +----------------------------------+---------+ | NAME | ENABLED | +----------------------------------+---------+ | events_stages_current | NO | | events_stages_history | NO | | events_stages_history_long | NO | | events_statements_current | YES | | events_statements_history | YES | | events_statements_history_long | NO | | events_transactions_current | YES | | events_transactions_history | YES | | events_transactions_history_long | NO | | events_waits_current | NO | | events_waits_history | NO | | events_waits_history_long | NO | | global_instrumentation | YES | | thread_instrumentation | YES | | statements_digest | YES | +----------------------------------+---------+ 27.2 Performance Schema Build Configuration