JLOCI test - Oracle logical IO drop table cpu_test_dummy; REM create the test table create table cpu_test_dummy (n primary key) organization index tablespace users as select rownum n from dba_tab_columns where rownum <= 20000; sys@CORE4> sys@CORE4> alter session set "_old_connect_by_enabled" = true; REM See how many seconds the following script runs (elapse time) set timing on select count(*) from ( select n from cpu_test_dummy connect by n > prior n start with n = 1 ) where rownum < 20000; drop table cpu_test_dummy; CORE4: COUNT(*) ---------- 19999 Elapsed: 00:00:20.57 Execution Plan ---------------------------------------------------------- Plan hash value: 1946589275 ------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | 9 (0)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | | | | |* 2 | COUNT STOPKEY | | | | | | | 3 | VIEW | | 1000 | | 9 (0)| 00:00:01 | | 4 | CONNECT BY | | | | | | |* 5 | INDEX UNIQUE SCAN| SYS_IOT_TOP_11559 | 1 | 13 | 1 (0)| 00:00:01 | | 6 | INDEX FULL SCAN | SYS_IOT_TOP_11559 | 1000 | 13000 | 2 (0)| 00:00:01 | |* 7 | INDEX RANGE SCAN | SYS_IOT_TOP_11559 | 1000 | 13000 | 2 (0)| 00:00:01 | ------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter(ROWNUM<20000) 5 - access("N"=1) 7 - access("N">PRIOR "N") Note ----- - dynamic sampling used for this statement Statistics ---------------------------------------------------------- 28 recursive calls 0 db block gets 20059 consistent gets 24 physical reads 0 redo size 517 bytes sent via SQL*Net to client 488 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed RAC4 (itrac415) COUNT(*) ---------- 19999 Elapsed: 00:01:00.54 Execution Plan ---------------------------------------------------------- Plan hash value: 3848030415 ------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | 9 (0)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | | | | |* 2 | COUNT STOPKEY | | | | | | | 3 | VIEW | | 1000 | | 9 (0)| 00:00:01 | | 4 | CONNECT BY | | | | | | |* 5 | INDEX UNIQUE SCAN| SYS_IOT_TOP_53467 | 1 | 13 | 1 (0)| 00:00:01 | | 6 | INDEX FULL SCAN | SYS_IOT_TOP_53467 | 1000 | 13000 | 2 (0)| 00:00:01 | |* 7 | INDEX RANGE SCAN | SYS_IOT_TOP_53467 | 1000 | 13000 | 2 (0)| 00:00:01 | ------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter(ROWNUM<20000) 5 - access("N"=1) 7 - access("N">PRIOR "N") Note ----- - dynamic sampling used for this statement Statistics ---------------------------------------------------------- 28 recursive calls 0 db block gets 20059 consistent gets 24 physical reads 0 redo size 413 bytes sent via SQL*Net to client 396 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed