没有做过,帮你UP了!=========================================================
我的回复,尽可能为你分忧解难!
BLOG:blog.csdn.net/softj --欢迎光临,有更多信息等着你!
QQ群:8476022专研数据库          --大家进来聊一聊!
MSN:[email protected] --这不常用!
Mail:[email protected] --有什么问题可以和我来EMAIL!
=========================================================

解决方案 »

  1.   

    你参考一下query-cache,把变量query_cache_size设置大一些,比如500M,看看效果如何!http://dev.mysql.com/doc/refman/5.0/en/query-cache.html
      

  2.   

    query-cache的用处不大啊,因为想要这样做最初的一个原因是受到了sql查询攻击,攻击者利用网站在用户注册时必须遍历库以确定是否有重复的用户名,然后不停的提交随机生成的用户名进行查询,这样每次查询的语句都不一样,所以query-cache再大也没有用,硬盘还得拼命的转~
    当然也可以通过建立索引来避免遍历,但这里只是为了说明问题而举的例子,因为某些查询始终是无法避免遍历的,比如提取大于平均值的记录。
    这个想法的本意是在用内存的高速度代替硬盘的低速度,同时又要有较强的抗风险能力[掉电或内存崩溃时丢失的数据不会超过2秒]
      

  3.   

    按照你的想法,不知道这样是否可行,未测试,也许硬盘会有更多io操作
    在你服务器上建两个数据库系统A B,提供A -〉B的复制,A系统经常被select的表都设置为heap类型,每次A数据库重新启动的时候,复制B所有A中为heap类型的数据过去
      

  4.   

    sorry,上面的那个想法不行,因为在复制中Memory(heap)类型在重新启动后有问题If you are using replication, the master server's MEMORY tables become empty when it is shut down and restarted. However, a slave is not aware that these tables have become empty, so it returns out-of-date content if you select data from them. When a MEMORY table is used on the master for the first time since the master was started, a DELETE FROM statement is written to the master's binary log automatically, thus synchronizing the slave to the master again. Note that even with this strategy, the slave still has outdated data in the table during the interval between the master's restart and its first use of the table. However, if you use the --init-file option to populate the MEMORY table on the master at startup, it ensures that this time interval is zero.
      

  5.   

    把最新查询所得的数据 出入leap表(直接读入内存的),这样就可以叻啊哈哈哈,
    或者用sealize haha