您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。