mysql如何查看SQL语句的执行时间

查看执行时间步骤

1.show profiles;

2.show variables; 查看profiling 是否是on状态;

3.如果是off,则执行命令  set profiling=1;

4.执行SQL语句

5.show profiles;  就可以查询到SQL语句的执行时间

数据库设计:

支持纯数字以及特殊字符当数据库的名字

$createdatabase=Db::query('create database `'.$projectdbconfig.'`');

注意:记得把数据库名字用``这样的符号引起来

posted @ 2019-05-22 11:08  ymd666  阅读(15811)  评论(0编辑  收藏  举报