'Azure MySQL database hung when run SELECT * FROM information_schema.statistics query

When I run the

SELECT * 
FROM information_schema.statistics

query database stopped processing other requests. At that time Azure monitoring display significant growth of "IO Percent" and Network In/Out metrics.

I guess the issue is related to the data size because I see next slow queries

SELECT table_name AS TABLE
    , (data_length + index_length) AS Size
FROM information_schema.TABLES;

SELECT tablename
    , count(uid) AS count
FROM sys_log
WHERE (type = 1)
    AND (action = 2)
GROUP BY tablename
ORDER BY tablename ASC;

Thank you in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source