语法: The SELECT ... INTO OUTFILE 'file_name' [options] form of SELECT writes the selected rows to a file. 示例: select * from students into outfile 'test/users.csv' fields terminated by ',' optionally enclosed by '"' -- fields separated by commas and en…
知识点十一:MySQL 慢查询的应用(23) 一.慢查询定义 MySQL记录下查询超过指定时间的语句,我们将超过指定时间的SQL语句查询称为慢查询. 查看时间限制 show variables like '%long%'; 如果查询超过long_query_time的时间就称为慢查询. 查看数据库的启动时间 show status like 'uptime%'; 查看查询语句条数 show status like 'comeSelect'; 获取连接数 show status like 'con…