[mysql优化]子查询与连接查询

  我们首先从子查询看起: i.子查询使用了三次临时表[using temporary],两次外部排序[using filesort]。最多扫描行数:57494。 ii.连接查询使用了两次临时表,两次外部排序。最多扫描行数7845。 使用show processlist可以看到使用子查询时,最长的时间消耗是在创建临时表数据[copying to tmp table]这个阶段:

PHP常见运行模式及原理

  关于PHP目前比较常见的五大运行模式: 1.CGI(通用网关接口 / Common Gateway Interface) 2.FastCGI(常驻型CGI / Long-Live CGI)

mysql用户与授权

  1.创建用户 insert into mysql.user(Host,User,Password) values("localhost","test",password("123456")); 2.用户授权 授权格式: grant 权限 on 数据库.* to 用户名@登录主机 identified by "密码";