`

order by引发的血案

 
阅读更多

首先,查看表的记录数

 

select count(rowid)from adjust_power_transaction_his t

 结果:

 

2521759

 

 使用order by的查询

 

select t.id,
       t.cardno,
       t.mobileno,
       t.imeihex,
       t.begintime,
       t.endtime,
       t.adjusttype,
       t.cardtype,
       t.transstatus,
       t.result
  from adjust_power_transaction_his t
 where 1 = 1
 order by t.id

 耗用时间:

使用了order by

 

去掉order by后重新查询

去掉order by后

 

 

 

 

0
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics