首页 > 其他 > 详细

表缓冲工作原理

时间:2014-03-20 00:41:23      阅读:559      评论:0      收藏:0      [点我收藏+]

在对sql语句用explain操作时多出了一个using  john buffer:

   mysql>explain select * from t1,t2 where t1.col<10 and t2.col<‘123‘;

   id     select_type   table   type   extra

   1       simple        t1     range   using  where

   2       simple         t2    range   using where:using john buffer

在没有使用john buffer的mysql服务上,执行下面这个表连接操作:

  table     type         -------                extra              

  tbl1      all

   tbl2      ref                                using where

   tbl3     range                               using where

在没有使用表连接的情况下,mysql服务将执行上述查询语句

 while(t1rec in tbl1)

{

      while(t3rec  in   tbl3 and t3rec.key1<40)

      {

                     put the(t1rec,t2rec,t3rec)combination to output buffer;

       }

}  

 这是没有采用缓冲算法的代码

 对于缓冲算法,下次继续哈。


本文出自 “Linux运维” 博客,请务必保留此出处http://2853725.blog.51cto.com/2843725/1379936

表缓冲工作原理,布布扣,bubuko.com

表缓冲工作原理

原文:http://2853725.blog.51cto.com/2843725/1379936

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!