index range scan和index fast full scan
2014-11-07 08:38
344 查看
SQL> create index idx_1 on t1(object_id); Index created. SQL> set linesie 200 SP2-0158: unknown SET option "linesie" SQL> select max(object_id) from t1; MAX(OBJECT_ID) -------------- 175920 SQL> select count(*) from t1 where object_id>170000; COUNT(*) ---------- 9696 SQL> set autot trace SQL> select count(*) from t1 where object_id>170000; Execution Plan ---------------------------------------------------------- Plan hash value: 3018594191 --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 13 | 40 (0)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | 13 | | | |* 2 | INDEX RANGE SCAN| IDX_1 | 20427 | 259K| 40 (0)| 00:00:01 | --------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("OBJECT_ID">170000) Note ----- - dynamic sampling used for this statement Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 25 consistent gets 0 physical reads 0 redo size 516 bytes sent via SQL*Net to client 492 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed SQL> select count(*) from t1 where object_id>170000; Execution Plan ---------------------------------------------------------- Plan hash value: 3018594191 --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 5 | 133 (1)| 00:00:02 | | 1 | SORT AGGREGATE | | 1 | 5 | | | |* 2 | INDEX RANGE SCAN| IDX_1 | 55470 | 270K| 133 (1)| 00:00:02 | --------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("OBJECT_ID">170000) Statistics ---------------------------------------------------------- 1 recursive calls 0 db block gets 25 consistent gets 0 physical reads 0 redo size 516 bytes sent via SQL*Net to client 492 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed SQL> select count(*) from t1 where object_id>1; Execution Plan ---------------------------------------------------------- Plan hash value: 1271403589 ------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 5 | 865 (3)| 00:00:11 | | 1 | SORT AGGREGATE | | 1 | 5 | | | |* 2 | INDEX FAST FULL SCAN| IDX_1 | 1648K| 8048K| 865 (3)| 00:00:11 | ------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter("OBJECT_ID">1) Statistics ---------------------------------------------------------- 1 recursive calls 0 db block gets 3652 consistent gets 522 physical reads 0 redo size 518 bytes sent via SQL*Net to client 492 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed SQL> select count(*) from t1 where object_id>=170000; Execution Plan ---------------------------------------------------------- Plan hash value: 3018594191 --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 5 | 133 (1)| 00:00:02 | | 1 | SORT AGGREGATE | | 1 | 5 | | | |* 2 | INDEX RANGE SCAN| IDX_1 | 55502 | 271K| 133 (1)| 00:00:02 | --------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("OBJECT_ID">=170000) Statistics ---------------------------------------------------------- 1 recursive calls 0 db block gets 25 consistent gets 0 physical reads 0 redo size 516 bytes sent via SQL*Net to client 492 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed
相关文章推荐
- index full scan/index fast full scan/index range scan
- ORACLE FAST FULL INDEX SCAN vs. INDEX RANGE SCANS
- oracle编程入门笔记2015-01-19--index fast full scan
- Index Full Scan && Index Range Scan
- INDEX FULL SCAN 与 INDEX FAST FULL SCAN
- Oracle INDEX FAST FULL SCAN与 INDEX FULL SCAN
- INDEX FULL SCAN vs INDEX FAST FULL SCAN
- index range scan,index fast full scan,index skip scan发生的条件
- index range scan,index fast full scan,index skip scan发生的条件
- index range scan,index fast full scan,index skip scan发生的条件
- INDEX FULL SCAN vs INDEX FAST FULL SCAN
- index range scan,index fast full scan,index skip scan发生的条件
- INDEX FULL SCAN vs INDEX FAST FULL SCAN
- 通过案例学调优之--Index FULL SCAN和Index FAST FULL SCAN
- INDEX FAST FULL SCAN AND SKIP SCAN
- 通过案例学调优之--Index FULL SCAN和Index FAST FULL SCAN
- index range scan,index fast full scan,index skip scan
- Oracle:index fast full scan VS. index skip scan (未解决)
- INDEX FULL SCAN vs INDEX FAST FULL SCAN
- full index scan and fast full index scan