sql> set autot trace
sql> select owner, object_name from
2 (select a.*, rownum as rn from
3 (select owner, object_name, rowid from t_test1 order by owner, object_id) a
4 where rownum <= 20)
5 where rn >= 11;
10 rows selected.
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=253 Card=20 Bytes=940)
1 0 VIEW (Cost=253 Card=20 Bytes=940)
2 1 COUNT (STOPKEY)
3 2 VIEW (Cost=253 Card=30670 Bytes=1042780)
4 3 SORT (ORDER BY STOPKEY) (Cost=253 Card=30670 Bytes=1196130)
5 4 table ACCESS (FULL) OF 'T_TEST1' (Cost=42 Card=306
70 Bytes=1196130)
sql> select owner, object_name from
2 (select a.*, rownum as rn from
3 (select owner, object_name, rowid from t_test1 order by owner, object_id) a
4 where rownum <= 20)
5 where rn >= 11;
10 rows selected.
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=253 Card=20 Bytes=940)
1 0 VIEW (Cost=253 Card=20 Bytes=940)
2 1 COUNT (STOPKEY)
3 2 VIEW (Cost=253 Card=30670 Bytes=1042780)
4 3 SORT (ORDER BY STOPKEY) (Cost=253 Card=30670 Bytes=1196130)
5 4 table ACCESS (FULL) OF 'T_TEST1' (Cost=42 Card=306
70 Bytes=1196130)