--查询当前MySQL本次启动后的运行统计时间 show status like 'uptime';
+---------------+-------+ | Variable_name | Value | +---------------+-------+ | Uptime | 5667 | +---------------+-------+ 1 row in set (0.00 sec)
show status like 'com_select';
+---------------+-------+ | Variable_name | Value | +---------------+-------+ | Com_select | 1 | +---------------+-------+ 1 row in set (0.00 sec)
show status like 'Thread_%';
+-------------------+-------+ | Variable_name | Value | +-------------------+-------+ | Threads_cached | 0 | | Threads_connected | 1 | | Threads_created | 1 | | Threads_running | 1 | +-------------------+-------+ 4 rows in set (0.00 sec)
SHOW [统计范围] STATUS [LIKE '状态项名称'] --统计范围关键字分为GLOBAL和SESSION(或LOCAL)两种。
show global status like 'com_select';
--查看MySQL本次启动后的运行时间(单位:秒) show status like 'uptime'; --查看select语句的执行数 show [global] status like 'com_select'; --查看insert语句的执行数 show [global] status like 'com_insert'; --查看update语句的执行数 show [global] status like 'com_update'; --查看delete语句的执行数 show [global] status like 'com_delete'; --查看试图连接到MySQL(不管是否连接成功)的连接数 show status like 'connections'; --查看线程缓存内的线程的数量。 show status like 'threads_cached'; --查看当前打开的连接的数量。 show status like 'threads_connected'; --查看当前打开的连接的数量。 show status like 'threads_connected'; --查看创建用来处理连接的线程数。如果Threads_created较大,你可能要增加thread_cache_size值。 show status like 'threads_created'; --查看激活的(非睡眠状态)线程数。 show status like 'threads_running'; --查看立即获得的表的锁的次数。 show status like 'table_locks_immediate'; --查看不能立即获得的表的锁的次数。如果该值较高,并且有性能问题,你应首先优化查询,然后拆分表或使用复制。 show status like 'table_locks_waited'; --查看创建时间超过slow_launch_time秒的线程数。 show status like 'slow_launch_threads'; --查看查询时间超过long_query_time秒的查询的个数。 show status like 'slow_queries';
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有