有一个查询语句:select * from users where username='ad2008'
第一次查询的时候会比较慢,之后再查询的时候,就比较快,我想可能跟缓存有关系
请问这个结果,mysql缓存到什么地方了,怎样不使用缓存呢?
第一次查询的时候会比较慢,之后再查询的时候,就比较快,我想可能跟缓存有关系
请问这个结果,mysql缓存到什么地方了,怎样不使用缓存呢?
解决方案 »
- mysql主从不同不,master停止写blogbin日志了
- 异地试图自动同步一个视图
- mysql++3.1能和mysql5.5一起用吗?
- 关于mysql的备份
- mysql乱码问题
- select * from table where column='username'不能检索到中文的username,英文可以。求助!
- 我急!我的mysql老是启动不起来!
- mysql的事务中怎么打印出异常信息
- Mysql并发控制加锁问题
- 怎么样根据生日选择年龄(段)mysql TO_DAYS(NOW()) - TO_DAYS(date_col)<= 30返回天数 怎样返回年
- 怎样为刚安装的mysql设置root的密码?
- [共享]我的高效mysql分页存储过程...
show variables like 'have_query_cache';如果结果是YES,代表有高速缓存。
如果是NO。代表没有
在my.ini或者my.cnf里配置其是否开启
[mysqld]
have_query_cache=no
关闭。重新启动MYSQL服务器
看到手册中:o disable the query cache at server startup, set the query_cache_size system variable to 0. By disabling the query cache code, there is no noticeable overhead. If you build MySQL from source, query cache capabilities can be excluded from the server entirely by invoking configure with the --without-query-cache option.所以在你的配置文件里
[mysqld]
query_cache_size=0然后重新启动MYSQL服务就可以了