1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
SQL>
SQL> drop table t;
Table supprimée.
SQL>
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL>
SQL> create table t as select * from all_objects;
Table créée.
SQL> create index t_idx on t(object_name);
Index créé.
SQL> exec dbms_stats.gather_table_stats( user, 'T' );
Procédure PL/SQL terminée avec succès.
SQL> set autotrace traceonly explain
SQL> select object_name from t where object_name like '%';
Plan d'exécution
----------------------------------------------------------
Plan hash value: 3163761342
------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 12255 | 215K| 16 (7)| 00:00:01 |
|* 1 | INDEX FAST FULL SCAN| T_IDX | 12255 | 215K| 16 (7)| 00:00:01 |
------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("OBJECT_NAME" LIKE '%')
SQL> select object_name from t where object_name like 'DBMS%';
Plan d'exécution
----------------------------------------------------------
Plan hash value: 2946670127
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 18 | 2 (0)| 00:00:01 |
|* 1 | INDEX RANGE SCAN| T_IDX | 1 | 18 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("OBJECT_NAME" LIKE 'DBMS%')
filter("OBJECT_NAME" LIKE 'DBMS%')
SQL> |
Partager