Database was added using UI so it is using performance_schema.
PMMVersion: 2.31.0
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 | YES |
| 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 |
+----------------------------------+---------+
Working query
SELECT
`t0`.`column0` AS `column0_1`,
`t0`.`column1` AS `column1_2`,
`t0`.`column2` AS `column2_3`,
`t0`.`column3` AS `column3_4`,
`t0`.`column4` AS `column4_5`,
`t0`.`column5` AS `column5_6`,
`t0`.`column6` AS `column6_7`,
`t0`.`column7` AS `column7_8`,
`t0`.`column8` AS `column8_9`,
`t0`.`column9` AS `column9_10`,
`t0`.`column10` AS `column10_11`,
`t0`.`column11` AS `column11_12`,
`t0`.`column12` AS `column12_13`,
`t0`.`column13` AS `column13_14`,
`t0`.`column14` AS `column14_15`
FROM
`column1_column2` `t0`
WHERE
`t0`.`column12` = ?
AND `t0`.`column13` = ?
AND `t0`.`column14` = ?
Not working query
SELECT
`b0_`.`column0` AS `column0_0`,
`b0_`.`column1` AS `column1_1`,
`b0_`.`column3` AS `column3_2`,
`b0_`.`column4` AS `column4_3`,
`b0_`.`column5` AS `column5_4`,
`b0_`.`column6` AS `column6_5`,
`b0_`.`column7` AS `column7_6`,
`b0_`.`column8` AS `column8_7`,
`b0_`.`column9` AS `column9_8`,
`b0_`.`column10` AS `column10_9`,
`b0_`.`column11` AS `column11_10`,
`b0_`.`column12` AS `column12_11`,
`b0_`.`column13` AS `column13_12`,
`b0_`.`column14` AS `column14_13`,
`b0_`.`column15` AS `column15_14`,
`b0_`.`column16` AS `column16_15`,
`b0_`.`column17` AS `column17_16`,
`b0_`.`column18` AS `column18_17`,
`b0_`.`column19` AS `column19_18`,
`b0_`.`column20` AS `column20_19`
FROM
`table` `b0_`
LEFT JOIN `table0` `b1_` ON `b0_`.`column0` = `b1_`.`table_column0`
LEFT JOIN `table1` `b2_` ON `b0_`.`column0` = `b2_`.`table_column0`
LEFT JOIN `table2` `t3_` ON `b1_`.`table4_string` = `t3_`.`string`
LEFT JOIN `table2` `t4_` ON `b2_`.`table2_string` = `t4_`.`string`
LEFT JOIN `table3` `t5_` ON `b1_`.`table3_string` = `t5_`.`string`
WHERE
`b0_`.`column4` < ?
AND (
(
`b0_`.`column8` IS NULL
OR `b0_`.`column8` < ?
)
)
AND `b0_`.`column18` = ?
AND `b0_`.`column10` = ?
AND `b0_`.`column11` IN (...)
AND (
(
(
`t5_`.`string` IS NOT NULL
AND `t5_`.`column18` = ?
)
OR `t5_`.`string` IS NULL
)
)
AND (
(
(
`t3_`.`string` IS NOT NULL
AND `t3_`.`column18` = ?
)
OR `t3_`.`string` IS NULL
)
)
AND (
(
(
`t4_`.`string` IS NOT NULL
AND `t4_`.`column18` = ?
)
OR `t4_`.`string` IS NULL
)
)
We’re connected multiple databases to PMM.