您好,登录后才能下订单哦!
create table t1 (
a1 bigint not null primary key auto_increment,
c10 char(10),
c100 char(100),
c200 char(200),
c30 char(255),
c300 text
)
insert into t1 (c10,c100,c200,c30,c300)values ('a','a','a','a','a');
insert into t1 (c10,c100,c200,c30,c300) select lpad(c10,10,'1'),lpad(c100,100,'1'),lpad(c200,190,'a'),lpad(c30,250,'1'),lpad(c300,2000,'1') from t1;
root@localhost [test]>select count(a1) from t1;
+-----------+
| count(a1) |
+-----------+
| 65536 |
select SQL_NO_CACHE count(1) from (
select a1 from t1 IGNORE INDEX (primary) order by c10 desc limit 1000 ) a;
select SQL_NO_CACHE count(1) from (
select a1,c100 from t1 IGNORE INDEX (primary) order by c10 desc limit 1000 ) a;
select SQL_NO_CACHE count(1) from (
select a1,c100,c200 from t1 IGNORE INDEX (primary) order by c10 desc limit 1000 ) a;
select SQL_NO_CACHE count(1) from (
select a1,c100,c200,c30 from t1 IGNORE INDEX (primary) order by c10 desc limit 1000 ) a;
select SQL_NO_CACHE count(1) from (
select a1,c100,c200,c30 ,c300 from t1 IGNORE INDEX (primary) order by c10 desc limit 1000 ) a;
select SQL_NO_CACHE count(1) from (
select * from t1 IGNORE INDEX (primary) order by c10 desc limit 1000 ) a;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。