SQL> select rownum rn ,a.* from cnmir.ew_auctions a where rownum<50000;
Execution Plan
----------------------------------------------------------
Plan hash value: 721966694
----------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 49999 | 4833K| 163 (2)| 00:00:02 |
|* 1 | COUNT STOPKEY | | | | | |
| 2 | TABLE ACCESS FULL| EW_AUCTIONS | 49999 | 4833K| 163 (2)| 00:00:02 |
----------------------------------------------------------------------------------
SQL> select * from cnmir.ew_auctions where issue_id<80;
Execution Plan
----------------------------------------------------------
Plan hash value: 518049957
---------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 99 | 1379 (2)| 00:00:17 |
|* 1 | TABLE ACCESS FULL| EW_AUCTIONS | 1 | 99 | 1379 (2)| 00:00:17 |
---------------------------------------------------------------------------------
可见COUNT STOPKEY 机制是只针对rownum而设定的!
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11423276/viewspace-983100/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11423276/viewspace-983100/