Optimizing Performance Schema Queries As indicated by  SHOW WARNINGS , the server handles the query on COLLATION_CHARACTER_SET_APPLICABILITY  as a query on the  character_sets  and  collations data dictionary tables in the  mysql  system database. Applications that monitor databases may make frequent use of Performance Schema tables. To write queries for these tables most efficiently, take advantage of their indexes. For example, include a  WHERE clause that restricts retrieved rows based on comparison to specific values in an indexed column. Most Performance Schema tables have indexes. Tables that do not are those that normally contain few rows or are unlikely to be queried frequently. Performance Schema indexes give the optimizer access to execution plans other than full table scans. These indexes also improve performance for related objects, such as  sys  schema views that use those tables. To see whether a given Performance Schema table has indexes and what they are, use  SHOW INDEX  or SHOW CREATE TABLE : mysql>  SHOW INDEX FROM performance_schema.accounts\G *************************** 1. row *************************** Table: accounts Non_unique: 0 Key_name: ACCOUNT  Seq_in_index: 1 Column_name: USER Collation: NULL Cardinality: NULL Sub_part: NULL Packed: NULL Null: YES Index_type: HASH Comment: Index_comment: Visible: YES *************************** 2. row *************************** Table: accounts Non_unique: 0 Key_name: ACCOUNT  Seq_in_index: 2 Column_name: HOST Collation: NULL Cardinality: NULL Sub_part: NULL Packed: NULL Null: YES Index_type: HASH Comment: Index_comment: Visible: YES mysql>  SHOW CREATE TABLE performance_schema.rwlock_instances\G *************************** 1. row *************************** Table: rwlock_instances Create Table: CREATE TABLE ‘rwlock_instances‘ ( ‘NAME‘ varchar(128) NOT NULL, ‘OBJECT_INSTANCE_BEGIN‘ bigint(20) unsigned NOT NULL, ‘WRITE_LOCKED_BY_THREAD_ID‘ bigint(20) unsigned DEFAULT NULL, ‘READ_LOCKED_BY_COUNT‘ int(10) unsigned NOT NULL, PRIMARY KEY (‘OBJECT_INSTANCE_BEGIN‘), 1711 8.2.4 Optimizing Performance Schema Queries from ‘mysql‘.‘character_sets‘ ‘cs‘ join ‘mysql‘.‘collations‘ ‘col‘ where ((‘mysql‘.‘col‘.‘character_set_id‘ = ’45’) and (’utf8mb4’ = ’utf8mb4’))