SELECT `information_schema` . `routines` . `ROUTINE_SCHEMA` AS `db` , `information_schema` . `routines` . `ROUTINE_TYPE` AS `object_type` , COUNT (?) AS `count` FROM `information_schema` . `routines` GROUP BY `information_schema` . `routines` . `ROUTINE_SCHEMA` , `information_schema` . `routines` . `ROUTINE_TYPE` UNION SELECT `information_schema` . `tables` . `TABLE_SCHEMA` AS `TABLE_SCHEMA` , `information_schema` . `tables` . `TABLE_TYPE` AS `TABLE_TYPE` , COUNT (?) AS `COUNT(*)` FROM `information_schema` . `tables` GROUP BY `information_schema` . `tables` . `TABLE_SCHEMA` , `information_schema` . `tables` . `TABLE_TYPE` UNION SELECT `information_schema` . `statistics` . `TABLE_SCHEMA` AS `TABLE_SCHEMA` , `concat` ( ? , `information_schema` . `statistics` . `INDEX_TYPE` , ? ) AS `CONCAT('INDEX (', INDEX_TYPE, ')')` , COUNT (?) AS `COUNT(*)` FROM `information_schema` . `statistics` GROUP BY `information_schema` . `statistics` . `TABLE_SCHEMA` , `information_schema` . `statistics` . `INDEX_TYPE` UNION SELECT `information_schema` . 