MySQL的查询优化很傻
select id from message where author_id in (select followed_id from Relation where follower_id=1) order by id desc 和 分别执行 $userlist = select followed_id from Relation where follower_id=1 再 select id from message where author_id in ($userlist) order by id desc 竟然有两个数量级的差别,DAMN IT!!!!
相关文档:
MySQL慢查询记录日志对于跟踪MySQL负载调优问题很有用处,其实启用MySQL的慢查询日志很简单,只需要在MySQL的配置文件里添加log-slow-queries和long_query_time两个参数即可。
Windows下开启MySQL慢查询
MySQL在Windows系统中的配置文件一般是是my.ini找到[mysqld]下面加上
log-slow-queries = F:\MySQL\log\mysqls ......
Weblogic 9.1的domain配置mysql连接池
本文介绍在weblogic 9.1下的domain配置mysql连接池步骤:
1.在weblogic目录下的serverlib下添加mysql驱动
mysql-connector-java-3.1.11-bin.jar
2.在weblogic目录下的commonin下找到commEnv.cmd打开
找到set weblogic_classpath= 后边加上mysql驱动 ......
1 1 Linux Red Hat 7.2 安装
Red Hat Linux 7.2的安装光盘共有两张:第一张可以直接从光盘启动,包含了大部分的软件包和一些安装工具;第二张光盘除了附加的软件包外,主要是源码、预览版软件等。
Red Hat Linux 7.2的安装界面非常友好,左面有即时详尽的帮助信息,右面是选项,完全支持鼠标操作。
将 ......
GRANT ALL PRIVILEGES
1。 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"
Sql代码 复制代码
1. mysql -u root -pvmwaremysql>use mysql;
  ......