ysql> select * from ab_view; +------+--------+------+----------------+ | id_a | nome_a | id_b | nome_b | +------+--------+------+----------------+ | 1 | casa | 1 | triplex | | 2 | barco | 2 | lancha model B | | 1 | casa | 3 | sobrado | | 1 | casa | 4 | mansao | +------+--------+------+----------------+ 4 rows in set (0.00 sec) mysql> select * from performance_schema.events_statements_summary_by_digest order by LAST_SEEN desc limit 5; +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | SCHEMA_NAME | DIGEST | DIGEST_TEXT | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | SUM_LOCK_TIME | SUM_ERRORS | SUM_WARNINGS | SUM_ROWS_AFFECTED | SUM_ROWS_SENT | SUM_ROWS_EXAMINED | SUM_CREATED_TMP_DISK_TABLES | SUM_CREATED_TMP_TABLES | SUM_SELECT_FULL_JOIN | SUM_SELECT_FULL_RANGE_JOIN | SUM_SELECT_RANGE | SUM_SELECT_RANGE_CHECK | SUM_SELECT_SCAN | SUM_SORT_MERGE_PASSES | SUM_SORT_RANGE | SUM_SORT_ROWS | SUM_SORT_SCAN | SUM_NO_INDEX_USED | SUM_NO_GOOD_INDEX_USED | FIRST_SEEN | LAST_SEEN | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | tempor | 89c4e1026cee35d60dd22568af23905f | ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `tempor` . `temp_a` `a` JOIN `tempor` . `temp_b` `b` WHERE ( `a` . `id` = `b` . `id_a` ) ) | 1 | 1934000000 | 1934000000 | 1934000000 | 1934000000 | 807000000 | 0 | 0 | 0 | 4 | 8 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 2018-02-12 19:05:06 | 2018-02-12 19:05:06 | | tempor | 9230618c394ad88ddc1dd06c7e978c22 | CREATE VIEW `ab_view` AS ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` ) | 1 | 16513000000 | 16513000000 | 16513000000 | 16513000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:04:40 | 2018-02-12 19:04:40 | | tempor | fafbe3291084d7bc9f7d821036af144a | INSERT INTO `temp_b` VALUES (...) | 4 | 5225000000 | 749000000 | 1306250000 | 2033000000 | 1828000000 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:31 | | NULL | 2cbac6ef48244e0574e54e34ac09786d | CREATE SCHEMA `tempor` | 1 | 466000000 | 466000000 | 466000000 | 466000000 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:30 | | NULL | 2cf2906bafd55ee74be1b693d8234ae8 | SELECT SCHEMA ( ) | 1 | 302000000 | 302000000 | 302000000 | 302000000 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:30 | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ 5 rows in set (0.00 sec) mysql> select * from ab_view where nome_b like '%tri%'; +------+--------+------+---------+ | id_a | nome_a | id_b | nome_b | +------+--------+------+---------+ | 1 | casa | 1 | triplex | +------+--------+------+---------+ 1 row in set (0.00 sec) mysql> select * from performance_schema.events_statements_summary_by_digest order by LAST_SEEN desc limit 5; +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | SCHEMA_NAME | DIGEST | DIGEST_TEXT | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | SUM_LOCK_TIME | SUM_ERRORS | SUM_WARNINGS | SUM_ROWS_AFFECTED | SUM_ROWS_SENT | SUM_ROWS_EXAMINED | SUM_CREATED_TMP_DISK_TABLES | SUM_CREATED_TMP_TABLES | SUM_SELECT_FULL_JOIN | SUM_SELECT_FULL_RANGE_JOIN | SUM_SELECT_RANGE | SUM_SELECT_RANGE_CHECK | SUM_SELECT_SCAN | SUM_SORT_MERGE_PASSES | SUM_SORT_RANGE | SUM_SORT_ROWS | SUM_SORT_SCAN | SUM_NO_INDEX_USED | SUM_NO_GOOD_INDEX_USED | FIRST_SEEN | LAST_SEEN | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | tempor | 89c4e1026cee35d60dd22568af23905f | ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `tempor` . `temp_a` `a` JOIN `tempor` . `temp_b` `b` WHERE ( `a` . `id` = `b` . `id_a` ) ) | 2 | 2866000000 | 932000000 | 1433000000 | 1934000000 | 1171000000 | 0 | 0 | 0 | 5 | 13 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 2 | 0 | 2018-02-12 19:05:06 | 2018-02-12 19:06:57 | | tempor | e0eb0b787886513f7d580e619bd0ee79 | SELECT * FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `LAST_SEEN` DESC LIMIT ? | 1 | 2411000000 | 2411000000 | 2411000000 | 2411000000 | 235000000 | 0 | 0 | 0 | 5 | 19 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 | 1 | 1 | 0 | 2018-02-12 19:05:59 | 2018-02-12 19:05:59 | | tempor | 9230618c394ad88ddc1dd06c7e978c22 | CREATE VIEW `ab_view` AS ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` ) | 1 | 16513000000 | 16513000000 | 16513000000 | 16513000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:04:40 | 2018-02-12 19:04:40 | | tempor | fafbe3291084d7bc9f7d821036af144a | INSERT INTO `temp_b` VALUES (...) | 4 | 5225000000 | 749000000 | 1306250000 | 2033000000 | 1828000000 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:31 | | NULL | 2cbac6ef48244e0574e54e34ac09786d | CREATE SCHEMA `tempor` | 1 | 466000000 | 466000000 | 466000000 | 466000000 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:30 | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ 5 rows in set (0.00 sec) mysql> select a.* from temp_a a , ab_view b where a.id = b.id_a; +----+-------+ | id | nome | +----+-------+ | 1 | casa | | 1 | casa | | 1 | casa | | 2 | barco | +----+-------+ 4 rows in set (0.00 sec) mysql> select * from performance_schema.events_statements_summary_by_digest order by LAST_SEEN desc limit 5; +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | SCHEMA_NAME | DIGEST | DIGEST_TEXT | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | SUM_LOCK_TIME | SUM_ERRORS | SUM_WARNINGS | SUM_ROWS_AFFECTED | SUM_ROWS_SENT | SUM_ROWS_EXAMINED | SUM_CREATED_TMP_DISK_TABLES | SUM_CREATED_TMP_TABLES | SUM_SELECT_FULL_JOIN | SUM_SELECT_FULL_RANGE_JOIN | SUM_SELECT_RANGE | SUM_SELECT_RANGE_CHECK | SUM_SELECT_SCAN | SUM_SORT_MERGE_PASSES | SUM_SORT_RANGE | SUM_SORT_ROWS | SUM_SORT_SCAN | SUM_NO_INDEX_USED | SUM_NO_GOOD_INDEX_USED | FIRST_SEEN | LAST_SEEN | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | tempor | 89c4e1026cee35d60dd22568af23905f | ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `tempor` . `temp_a` `a` JOIN `tempor` . `temp_b` `b` WHERE ( `a` . `id` = `b` . `id_a` ) ) | 3 | 3864000000 | 932000000 | 1288000000 | 1934000000 | 1578000000 | 0 | 0 | 0 | 9 | 25 | 0 | 0 | 2 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 3 | 0 | 2018-02-12 19:05:06 | 2018-02-12 19:08:50 | | tempor | e0eb0b787886513f7d580e619bd0ee79 | SELECT * FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `LAST_SEEN` DESC LIMIT ? | 2 | 3342000000 | 931000000 | 1671000000 | 2411000000 | 440000000 | 0 | 0 | 0 | 10 | 39 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 10 | 2 | 2 | 0 | 2018-02-12 19:05:59 | 2018-02-12 19:07:03 | | tempor | 9230618c394ad88ddc1dd06c7e978c22 | CREATE VIEW `ab_view` AS ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` ) | 1 | 16513000000 | 16513000000 | 16513000000 | 16513000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:04:40 | 2018-02-12 19:04:40 | | tempor | fafbe3291084d7bc9f7d821036af144a | INSERT INTO `temp_b` VALUES (...) | 4 | 5225000000 | 749000000 | 1306250000 | 2033000000 | 1828000000 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:31 | | NULL | 2cbac6ef48244e0574e54e34ac09786d | CREATE SCHEMA `tempor` | 1 | 466000000 | 466000000 | 466000000 | 466000000 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:30 | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ 5 rows in set (0.00 sec) mysql> select a.* from temp_a a , ab_view b where a.id = b.id_a and a.nome like '%bar%'; +----+-------+ | id | nome | +----+-------+ | 2 | barco | +----+-------+ 1 row in set (0.00 sec) mysql> select * from performance_schema.events_statements_summary_by_digest order by LAST_SEEN desc limit 5; +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | SCHEMA_NAME | DIGEST | DIGEST_TEXT | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | SUM_LOCK_TIME | SUM_ERRORS | SUM_WARNINGS | SUM_ROWS_AFFECTED | SUM_ROWS_SENT | SUM_ROWS_EXAMINED | SUM_CREATED_TMP_DISK_TABLES | SUM_CREATED_TMP_TABLES | SUM_SELECT_FULL_JOIN | SUM_SELECT_FULL_RANGE_JOIN | SUM_SELECT_RANGE | SUM_SELECT_RANGE_CHECK | SUM_SELECT_SCAN | SUM_SORT_MERGE_PASSES | SUM_SORT_RANGE | SUM_SORT_ROWS | SUM_SORT_SCAN | SUM_NO_INDEX_USED | SUM_NO_GOOD_INDEX_USED | FIRST_SEEN | LAST_SEEN | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | tempor | 89c4e1026cee35d60dd22568af23905f | ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `tempor` . `temp_a` `a` JOIN `tempor` . `temp_b` `b` WHERE ( `a` . `id` = `b` . `id_a` ) ) | 4 | 4671000000 | 807000000 | 1167750000 | 1934000000 | 1937000000 | 0 | 0 | 0 | 10 | 31 | 0 | 0 | 2 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 4 | 0 | 2018-02-12 19:05:06 | 2018-02-12 19:10:08 | | tempor | e0eb0b787886513f7d580e619bd0ee79 | SELECT * FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `LAST_SEEN` DESC LIMIT ? | 3 | 4156000000 | 814000000 | 1385333000 | 2411000000 | 642000000 | 0 | 0 | 0 | 15 | 59 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 15 | 3 | 3 | 0 | 2018-02-12 19:05:59 | 2018-02-12 19:08:56 | | tempor | 9230618c394ad88ddc1dd06c7e978c22 | CREATE VIEW `ab_view` AS ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` ) | 1 | 16513000000 | 16513000000 | 16513000000 | 16513000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:04:40 | 2018-02-12 19:04:40 | | tempor | fafbe3291084d7bc9f7d821036af144a | INSERT INTO `temp_b` VALUES (...) | 4 | 5225000000 | 749000000 | 1306250000 | 2033000000 | 1828000000 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:31 | | NULL | 2cbac6ef48244e0574e54e34ac09786d | CREATE SCHEMA `tempor` | 1 | 466000000 | 466000000 | 466000000 | 466000000 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:30 | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ 5 rows in set (0.00 sec) mysql> select a.* from temp_a a , ab_view b where a.id = b.id_a and a.nome like '%bar%' and a.id = 2; +----+-------+ | id | nome | +----+-------+ | 2 | barco | +----+-------+ 1 row in set (0.00 sec) mysql> select * from performance_schema.events_statements_summary_by_digest order by LAST_SEEN desc limit 5; +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | SCHEMA_NAME | DIGEST | DIGEST_TEXT | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | SUM_LOCK_TIME | SUM_ERRORS | SUM_WARNINGS | SUM_ROWS_AFFECTED | SUM_ROWS_SENT | SUM_ROWS_EXAMINED | SUM_CREATED_TMP_DISK_TABLES | SUM_CREATED_TMP_TABLES | SUM_SELECT_FULL_JOIN | SUM_SELECT_FULL_RANGE_JOIN | SUM_SELECT_RANGE | SUM_SELECT_RANGE_CHECK | SUM_SELECT_SCAN | SUM_SORT_MERGE_PASSES | SUM_SORT_RANGE | SUM_SORT_ROWS | SUM_SORT_SCAN | SUM_NO_INDEX_USED | SUM_NO_GOOD_INDEX_USED | FIRST_SEEN | LAST_SEEN | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | tempor | 89c4e1026cee35d60dd22568af23905f | ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `tempor` . `temp_a` `a` JOIN `tempor` . `temp_b` `b` WHERE ( `a` . `id` = `b` . `id_a` ) ) | 5 | 5704000000 | 807000000 | 1140800000 | 1934000000 | 2298000000 | 0 | 0 | 0 | 11 | 32 | 0 | 0 | 2 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 4 | 0 | 2018-02-12 19:05:06 | 2018-02-12 19:10:41 | | tempor | e0eb0b787886513f7d580e619bd0ee79 | SELECT * FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `LAST_SEEN` DESC LIMIT ? | 4 | 5114000000 | 814000000 | 1278500000 | 2411000000 | 852000000 | 0 | 0 | 0 | 20 | 79 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 20 | 4 | 4 | 0 | 2018-02-12 19:05:59 | 2018-02-12 19:10:13 | | tempor | 9230618c394ad88ddc1dd06c7e978c22 | CREATE VIEW `ab_view` AS ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` ) | 1 | 16513000000 | 16513000000 | 16513000000 | 16513000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:04:40 | 2018-02-12 19:04:40 | | tempor | fafbe3291084d7bc9f7d821036af144a | INSERT INTO `temp_b` VALUES (...) | 4 | 5225000000 | 749000000 | 1306250000 | 2033000000 | 1828000000 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:31 | | NULL | 2cbac6ef48244e0574e54e34ac09786d | CREATE SCHEMA `tempor` | 1 | 466000000 | 466000000 | 466000000 | 466000000 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:30 | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ 5 rows in set (0.00 sec) mysql> select a.id as id_a, a.nome as nome_a, b.id as id_b, b.nome as nome_b from temp_a a, temp_b b where a.id = b.id_a ; +------+--------+------+----------------+ | id_a | nome_a | id_b | nome_b | +------+--------+------+----------------+ | 1 | casa | 1 | triplex | | 2 | barco | 2 | lancha model B | | 1 | casa | 3 | sobrado | | 1 | casa | 4 | mansao | +------+--------+------+----------------+ 4 rows in set (0.00 sec) mysql> select * from performance_schema.events_statements_summary_by_digest order by LAST_SEEN desc limit 5; +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | SCHEMA_NAME | DIGEST | DIGEST_TEXT | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | SUM_LOCK_TIME | SUM_ERRORS | SUM_WARNINGS | SUM_ROWS_AFFECTED | SUM_ROWS_SENT | SUM_ROWS_EXAMINED | SUM_CREATED_TMP_DISK_TABLES | SUM_CREATED_TMP_TABLES | SUM_SELECT_FULL_JOIN | SUM_SELECT_FULL_RANGE_JOIN | SUM_SELECT_RANGE | SUM_SELECT_RANGE_CHECK | SUM_SELECT_SCAN | SUM_SORT_MERGE_PASSES | SUM_SORT_RANGE | SUM_SORT_ROWS | SUM_SORT_SCAN | SUM_NO_INDEX_USED | SUM_NO_GOOD_INDEX_USED | FIRST_SEEN | LAST_SEEN | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ | tempor | b85a22b100d3682241c903561ea96a04 | SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` | 1 | 649000000 | 649000000 | 649000000 | 649000000 | 213000000 | 0 | 0 | 0 | 4 | 8 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 2018-02-12 19:11:41 | 2018-02-12 19:11:41 | | tempor | e0eb0b787886513f7d580e619bd0ee79 | SELECT * FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `LAST_SEEN` DESC LIMIT ? | 5 | 5919000000 | 805000000 | 1183800000 | 2411000000 | 1048000000 | 0 | 0 | 0 | 25 | 99 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 0 | 25 | 5 | 5 | 0 | 2018-02-12 19:05:59 | 2018-02-12 19:10:54 | | tempor | 89c4e1026cee35d60dd22568af23905f | ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `tempor` . `temp_a` `a` JOIN `tempor` . `temp_b` `b` WHERE ( `a` . `id` = `b` . `id_a` ) ) | 5 | 5704000000 | 807000000 | 1140800000 | 1934000000 | 2298000000 | 0 | 0 | 0 | 11 | 32 | 0 | 0 | 2 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 4 | 0 | 2018-02-12 19:05:06 | 2018-02-12 19:10:41 | | tempor | 9230618c394ad88ddc1dd06c7e978c22 | CREATE VIEW `ab_view` AS ( SELECT `a` . `id` AS `id_a` , `a` . `nome` AS `nome_a` , `b` . `id` AS `id_b` , `b` . `nome` AS `nome_b` FROM `temp_a` `a` , `temp_b` `b` WHERE `a` . `id` = `b` . `id_a` ) | 1 | 16513000000 | 16513000000 | 16513000000 | 16513000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:04:40 | 2018-02-12 19:04:40 | | tempor | fafbe3291084d7bc9f7d821036af144a | INSERT INTO `temp_b` VALUES (...) | 4 | 5225000000 | 749000000 | 1306250000 | 2033000000 | 1828000000 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2018-02-12 19:03:30 | 2018-02-12 19:03:31 | +-------------+----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------+----------------+----------------+----------------+---------------+------------+--------------+-------------------+---------------+-------------------+-----------------------------+------------------------+----------------------+----------------------------+------------------+------------------------+-----------------+-----------------------+----------------+---------------+---------------+-------------------+------------------------+---------------------+---------------------+ 5 rows in set (0.00 sec)