如何在mysql中查找每小时执行的选择查询数?
有没有办法找到这个?
请帮帮我。
谢谢,
尼特什·库马尔
You could enable MySQL's general query logging to a table (note that this has a non-negligible performance impact) and then perform queries on the data:
SELECT DATE(event_time), HOUR(event_time), COUNT(*) AS select_queries
FROM mysql.general_log
WHERE argument LIKE 'select %'
GROUP BY DATE(event_time), HOUR(event_time)