Mysql 去一个牧场。650000后,这是一场噩梦。我想,这是慢的解释的输出。快的那个呢?是否有相同的输出?是。b33分布均匀。下面是explain:***************************************************1的输出。行*

Mysql 去一个牧场。650000后,这是一场噩梦。我想,这是慢的解释的输出。快的那个呢?是否有相同的输出?是。b33分布均匀。下面是explain:***************************************************1的输出。行*,mysql,select,join,indexing,slowdown,Mysql,Select,Join,Indexing,Slowdown,去一个牧场。650000后,这是一场噩梦。我想,这是慢的解释的输出。快的那个呢?是否有相同的输出?是。b33分布均匀。下面是explain:***************************************************1的输出。行***************************************id:1选择类型:简单表:b类型:范围可能的\u键:i1,id键:id键\u长度:4参考:空行:981额外:使用where***********************


去一个牧场。650000后,这是一场噩梦。我想,这是慢的解释的输出。快的那个呢?是否有相同的输出?是。b33分布均匀。下面是explain:
***************************************************1的输出。行***************************************id:1选择类型:简单表:b类型:范围可能的\u键:i1,id键:id键\u长度:4参考:空行:981额外:使用where*********************************************2。行*********************************id:1选择类型:简单表:a类型:eq\u参考可能的\u键:主键:主键\u len:4参考:ja\u steppup.b.剩余行:1额外:集合中的2行(0.00秒)
select A.*, b2, b5, b7, b8, b10, b13, b33, (b33 - 1 DIV 1000) the_group
from A join B on a1=b1 
select A.*, b2, b5, b7, b8, b10, b13, b33 
from A join (select b1,b2, b5, b7, b8, b10, b13, b33 
             from B b33 >= pos and b33 < pos+1000) B_NEW 
     on a1=b1 ;
select A.*, b2, b5, b7, b8, b10, b13, b33 
  from A join B 
  on a1=b1 
  where b33 BETWEEN pos AND pos+999;
SHOW INDEXES FROM B;
select b2, b5, b7, b8, b10, b13, b33 from B where b33 >= pos and b33 < pos+1000;
SET profiling=1;

select A.*, b2, b5, b7, b8, b10, b13, b33 from A join B on a1=b1 where b33 >= 0 and b33 < 1000;
SHOW PROFILE;

select A.*, b2, b5, b7, b8, b10, b13, b33 from A join B on a1=b1 where b33 >= 1000000 and b33 < 1001000;
SHOW PROFILE;


SET profiling=0;
select A.*, b2, b5, b7, b8, b10, b13, b33
from A join B on a1=b1 where b33 >= pos and b33 < pos+1000;
SELECT
    AAA.*,b2,b5,b7,b8,b10,b13,b33
FROM
    A AAA INNER JOIN
    (
        select
            A.a1,b2,b5,b7,b8,b10,b13,b33
        from
            A INNER JOIN
            (
               SELECT
                   b1,b2,b5,b7,b8,b10,b13,b33
               FROM B
               WHERE
                    b33 >= pos and
                    b33 < pos+1000
            ) BB
            ON A.a1=B.b1
    ) BBB
    USING (a1)
;
select A.*, b2, b5, b7, b8, b10, b13, b33 from A join B
  on a1=b1 and b33 >= pos and b33 < pos+1000;