Skip to content

Instantly share code, notes, and snippets.

@systay
Created July 18, 2022 10:48
Show Gist options
  • Save systay/8e9fb97bab8718f5ce904c5663085cec to your computer and use it in GitHub Desktop.
Save systay/8e9fb97bab8718f5ce904c5663085cec to your computer and use it in GitHub Desktop.
| -> Table scan on <temporary> (actual time=0.001..0.002 rows=8 loops=1)
-> Aggregate using temporary table (actual time=0.635..0.637 rows=8 loops=1)
-> Nested loop left join (actual time=0.382..0.555 rows=8 loops=1)
-> Nested loop left join (actual time=0.375..0.532 rows=8 loops=1)
-> Nested loop left join (actual time=0.373..0.526 rows=8 loops=1)
-> Nested loop inner join (actual time=0.367..0.513 rows=8 loops=1)
-> Inner hash join (no condition) (actual time=0.207..0.218 rows=13 loops=1)
-> Table scan on i (cost=0.00 rows=0) (actual time=0.001..0.005 rows=13 loops=1)
-> Fill information schema table i (actual time=0.172..0.177 rows=13 loops=1)
-> Hash
-> Nested loop inner join (cost=0.70 rows=1) (actual time=0.024..0.027 rows=1 loops=1)
-> Covering index scan on cat using name (cost=0.35 rows=1) (actual time=0.013..0.015 rows=1 loops=1)
-> Filter: ((mysql.sch.`name` collate utf8_tolower_ci) = 'test') (cost=0.35 rows=1) (actual time=0.011..0.011 rows=1 loops=1)
-> Single-row covering index lookup on sch using catalog_id (catalog_id=mysql.cat.id, name='test') (cost=0.35 rows=1) (actual time=0.009..0.009 rows=1 loops=1)
-> Filter: (((i.`NAME` = concat((mysql.sch.`name` collate utf8_tolower_ci),'/',(mysql.tbl.`name` collate utf8_tolower_ci))) or (i.`NAME` like concat((mysql.sch.`name` collate utf8_tolower_ci),'/',(mysql.tbl.`name` collate utf8_tolower_ci),'#p#%'))) and (0 <> can_access_table(mysql.sch.`name`,mysql.tbl.`name`)) and (0 <> is_visible_dd_object(mysql.tbl.hidden))) (cost=4.88 rows=32) (actual time=0.018..0.022 rows=1 loops=13)
-> Index lookup on tbl using schema_id (schema_id=mysql.sch.id) (cost=4.88 rows=32) (actual time=0.004..0.016 rows=8 loops=13)
-> Single-row covering index lookup on col using PRIMARY (id=mysql.tbl.collation_id) (cost=0.13 rows=1) (actual time=0.001..0.001 rows=1 loops=8)
-> Single-row covering index lookup on ts using PRIMARY (id=mysql.tbl.tablespace_id) (cost=0.13 rows=1) (actual time=0.000..0.000 rows=0 loops=8)
-> Filter: ((mysql.tbl.`name` = mysql.stat.`table_name`) and (mysql.sch.`name` = mysql.stat.`schema_name`)) (cost=0.13 rows=1) (actual time=0.003..0.003 rows=0 loops=8)
-> Single-row covering index lookup on stat using PRIMARY (schema_name=mysql.sch.`name`, table_name=mysql.tbl.`name`) (cost=0.13 rows=1) (actual time=0.002..0.002 rows=0 loops=8)
|
| -> Table scan on <temporary> (actual time=0.003..0.004 rows=8 loops=1)
-> Aggregate using temporary table (actual time=0.737..0.739 rows=8 loops=1)
-> Nested loop left join (cost=34.10 rows=0) (actual time=0.400..0.610 rows=8 loops=1)
-> Nested loop left join (cost=25.98 rows=0) (actual time=0.393..0.585 rows=8 loops=1)
-> Nested loop left join (cost=17.85 rows=0) (actual time=0.392..0.579 rows=8 loops=1)
-> Nested loop inner join (cost=9.73 rows=0) (actual time=0.387..0.566 rows=8 loops=1)
-> Inner hash join (no condition) (cost=3.23 rows=0) (actual time=0.348..0.355 rows=8 loops=1)
-> Table scan on i (cost=2.50..2.50 rows=0) (actual time=0.000..0.002 rows=8 loops=1)
-> Materialize (cost=5.00..5.00 rows=0) (actual time=0.304..0.307 rows=8 loops=1)
-> Table scan on <temporary> (cost=2.50..2.50 rows=0) (actual time=0.001..0.002 rows=8 loops=1)
-> Temporary table with deduplication (cost=2.50..2.50 rows=0) (actual time=0.292..0.294 rows=8 loops=1)
-> Filter: (information_schema.innodb_tablespaces.`NAME` like <cache>(concat(database(),'/%'))) (actual time=0.272..0.276 rows=8 loops=1)
-> Table scan on innodb_tablespaces (cost=0.00 rows=0) (actual time=0.001..0.003 rows=13 loops=1)
-> Fill information schema table innodb_tablespaces (actual time=0.267..0.271 rows=13 loops=1)
-> Hash
-> Nested loop inner join (cost=0.70 rows=1) (actual time=0.031..0.034 rows=1 loops=1)
-> Covering index scan on cat using name (cost=0.35 rows=1) (actual time=0.014..0.016 rows=1 loops=1)
-> Filter: ((mysql.sch.`name` collate utf8_tolower_ci) = 'test') (cost=0.35 rows=1) (actual time=0.012..0.012 rows=1 loops=1)
-> Single-row covering index lookup on sch using catalog_id (catalog_id=mysql.cat.id, name='test') (cost=0.35 rows=1) (actual time=0.010..0.010 rows=1 loops=1)
-> Filter: (((i.`name` = concat((mysql.sch.`name` collate utf8_tolower_ci),'/',(mysql.tbl.`name` collate utf8_tolower_ci))) or (i.`name` like concat((mysql.sch.`name` collate utf8_tolower_ci),'/',(mysql.tbl.`name` collate utf8_tolower_ci),'#p#%'))) and (0 <> can_access_table(mysql.sch.`name`,mysql.tbl.`name`)) and (0 <> is_visible_dd_object(mysql.tbl.hidden))) (cost=4.88 rows=32) (actual time=0.016..0.026 rows=1 loops=8)
-> Index lookup on tbl using schema_id (schema_id=mysql.sch.id) (cost=4.88 rows=32) (actual time=0.006..0.018 rows=8 loops=8)
-> Single-row covering index lookup on col using PRIMARY (id=mysql.tbl.collation_id) (cost=0.13 rows=1) (actual time=0.001..0.001 rows=1 loops=8)
-> Single-row covering index lookup on ts using PRIMARY (id=mysql.tbl.tablespace_id) (cost=0.13 rows=1) (actual time=0.000..0.000 rows=0 loops=8)
-> Filter: ((mysql.tbl.`name` = mysql.stat.`table_name`) and (mysql.sch.`name` = mysql.stat.`schema_name`)) (cost=0.13 rows=1) (actual time=0.003..0.003 rows=0 loops=8)
-> Single-row covering index lookup on stat using PRIMARY (schema_name=mysql.sch.`name`, table_name=mysql.tbl.`name`) (cost=0.13 rows=1) (actual time=0.003..0.003 rows=0 loops=8)
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment