您好,登錄后才能下訂單哦!
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;
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。