SQL基础笔记(3)- DBMS数据库管理系统相关查询语句

1. 开启SQL语句执行时间

如何知道 SQL 执行时所使用的资源情况,开启profiling

1.1 查询profiling

在这里插入图片描述

1
mysql> select @@profiling;

1.2 设置profiling

1
mysql> set profiling=1;

2. SQL执行历史查询

2.1 执行历史

在这里插入图片描述

1
mysql> show profiles;

2.2 执行过程的具体时间

1
mysql> show profile for query 4;

在这里插入图片描述

3. 查看DBMS MySQL的版本

在这里插入图片描述

1
mysql> select version();