当前位置:网站首页>Fragmentary knowledge points of MySQL
Fragmentary knowledge points of MySQL
2022-06-30 17:31:00 【wang0907】
Write it at the front
This section is used to record MySQL Small pieces of knowledge in the learning process , It is also convenient for you to check later when sharing .
1: Slow log
The main parameters of the slow log are as follows :
Control switch :slow_query_log
Slow log writing execution time :long_query_time
Slow log files :slow_query_log_file
The following settings :
mysql> set global slow_query_log=1;
Query OK, 0 rows affected (0.04 sec)
mysql> show variables like 'slow_query_log';
+---------------------+---------------------------------------------------------------+
| Variable_name | Value |
+---------------------+---------------------------------------------------------------+
| slow_query_log | ON |
+---------------------+---------------------------------------------------------------+
1 rows in set (0.00 sec)
mysql> set long_query_time=0;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like 'long_query_time';
+-----------------+----------+
| Variable_name | Value |
+-----------------+----------+
| long_query_time | 0.000000 |
+-----------------+----------+
1 row in set (0.00 sec)
mysql> show variables like 'slow_query_log_file';
+---------------------+---------------------------------------------------------------+
| Variable_name | Value |
+---------------------+---------------------------------------------------------------+
| slow_query_log_file | D:\program_files\phpstudy\PHPTutorial\MySQL\data\jhp-slow.log |
+---------------------+---------------------------------------------------------------+
1 row in set (0.00 sec)
In order to test the effect long_query_time Set to 0, So all the sql Statements are recorded in the slow log , For example, execute the following sql sentence :
mysql> select count(*) from t;
+----------+
| count(*) |
+----------+
| 100000 |
+----------+
You can view the generated slow log :

Written in the back
Refer to the list of articles :
边栏推荐
- Redis elimination strategy
- Required plug-ins for idea
- 商鼎云新版来袭 | 收藏夹功能已上线,满足个人使用需求
- Nut cloud - sync files on your mobile hard drive on your new computer
- Share 5 commonly used feature selection methods, and you must see them when you get started with machine learning!!!
- addmodule_ allmerge_ ams_ im
- 基于SSM实现毕业设计管理系统
- Exch: repair the missing system mailbox
- 编写C语言的最简单小程序Hello world
- [JVM] takes you to learn about the garbage collection mechanism (GC) in the JVM -- including diagrams
猜你喜欢

Compile - compile for itop4412 development board makefile

高等数学(第七版)同济大学 总习题一 个人解答

浅析搭建高速公路视频监控平台的建设方案及必要性

编译生成busybox文件系统

平面相交与平面方程
![leetcode:1042. Do not plant flowers adjacent to each other [randomly fill in qualified + no contradiction will be formed behind + set.pop]](/img/eb/3264776ff46e4bff628fb84d94db88.png)
leetcode:1042. Do not plant flowers adjacent to each other [randomly fill in qualified + no contradiction will be formed behind + set.pop]

Parker variable displacement piston pump pv092r1k1t1nmmc

leetcode:1042. 不邻接植花【随机填入符合要求的 + 后面不会形成矛盾 + set.pop】

Splitting. JS text title slow loading JS effect

解决方法:STM32使用cJSON解析数据失败
随机推荐
Differential analysis between different groups nichenet for silicosis runs successfully!
The gates of Europe
How can you choose to work in the county after graduation?
编译生成busybox文件系统
"Promotion + funny plot", how to collide with the sparks of popular funds?
Course design for the end of the semester: product sales management system based on SSM
Acwing game 57
【C语言】详解线程 — 线程分离函数 pthread_detach
Required plug-ins for idea
leetcode:1042. 不邻接植花【随机填入符合要求的 + 后面不会形成矛盾 + set.pop】
Canvas cloud shape animation
Cesium-1.72 learning (camera tracking)
canvas云朵形状动画
美国穆格moog伺服阀D661-4577C
[C language] explain threads - thread separation function pthread_ detach
万卷书 - 欧洲的门户 [The Gates of Europe]
5G商用三年,未来创新何去何从?
3D图表有效提升数据大屏档次
理解现货白银走势的关键
美国PARKER派克传感器P8S-GRFLX