mysql> show create view v_info_top50_tablecount\G
*************************** 1. row ***************************
View: v_info_top50_tablecount
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`deeden`@`localhost` SQL SECURITY DEFINER VIEW `deeden`.`v_info_top50_tablecount` AS select sql_no_cache `v_info_tablecount`.`schema_name` AS `schema_name`,`v_info_tablecount`.`table_count` AS `table_count` from `deeden`.`v_info_tablecount` order by `v_info_tablecount`.`table_count` desc limit 50
1 row in set (0.00 sec)
mysql> show create view v_info_tablecount\G
*************************** 1. row ***************************
View: v_info_tablecount
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`deeden`@`localhost` SQL SECURITY DEFINER VIEW `deeden`.`v_info_tablecount` AS select sql_no_cache `s`.`SCHEMA_NAME` AS `schema_name`,count(`t`.`TABLE_NAME`) AS `table_count` from (`information_schema`.`schemata` `s` left join `information_schema`.`tables` `t` on((`s`.`SCHEMA_NAME` = `t`.`TABLE_SCHEMA`))) group by `s`.`SCHEMA_NAME`
1 row in set (0.00 sec)
mysql> select count(*) from information_schema.tables;
+----------+
| count(*) |
+----------+
| 8519 |
+----------+
1 row in set (3.36 sec)
mysql> select count(*) from information_schema.schemata;
+----------+
| count(*) |
+----------+
| 247 |
+----------+
1 row in set (0.01 sec)
mysql> explain select * from v_info_top50_tablecount;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> show create view v_info_ top50_tablecoun t\G ******* ******* ****** 1. row ******* ******* ******* ****** top50_tablecoun t `deeden` @`localhost` SQL SECURITY DEFINER VIEW `deeden` .`v_info_ top50_tablecoun t` AS select sql_no_cache `v_info_ tablecount` .`schema_ name` AS `schema_ name`,` v_info_ tablecount` .`table_ count` AS `table_count` from `deeden` .`v_info_ tablecount` order by `v_info_ tablecount` .`table_ count` desc limit 50
*******
View: v_info_
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=
1 row in set (0.00 sec)
mysql> show create view v_info_tablecount\G ******* ******* ****** 1. row ******* ******* ******* ****** `deeden` @`localhost` SQL SECURITY DEFINER VIEW `deeden` .`v_info_ tablecount` AS select sql_no_cache `s`.`SCHEMA_NAME` AS `schema_ name`,count( `t`.`TABLE_ NAME`) AS `table_count` from (`information_ schema` .`schemata` `s` left join `information_ schema` .`tables` `t` on((`s` .`SCHEMA_ NAME` = `t`.`TABLE_ SCHEMA` ))) group by `s`.`SCHEMA_NAME`
*******
View: v_info_tablecount
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=
1 row in set (0.00 sec)
mysql> select count(*) from information_ schema. tables;
+----------+
| count(*) |
+----------+
| 8519 |
+----------+
1 row in set (3.36 sec)
mysql> select count(*) from information_ schema. schemata;
+----------+
| count(*) |
+----------+
| 247 |
+----------+
1 row in set (0.01 sec)
mysql> explain select * from v_info_ top50_tablecoun t;
ERROR 2013 (HY000): Lost connection to MySQL server during query