miércoles, 27 de agosto de 2008

Oracle Database 10g Querys Plan de Ejecucion

SQL> SET AUTOTRACE ON;
SQL> set autotrace on timing on
SQL> SELECT * FROM PER_PERSONA;

SALE RESULTADO Y PLAN DE EJECUCION

SQL> SET AUTOTRACE TRACEONLY;
SQL> SELECT * FROM PER_PERSONA;

EXPLAIN PLAN FOR 2 SELECT /*+ DYNAMIC_SAMPLING(2) */ id 3 FROM test_temp ;Explained.-------------------------------------------------------------------- Id Operation Name Rows Bytes Cost -------------------------------------------------------------------- 0 SELECT STATEMENT 1 13 11 1 TABLE ACCESS FULL TEST_TEMP 1 13 11 --------------------------------------------------------------------

SQL> DESC PLAN_TABLE

PERFORMANCE QUERYS

SQL> EXPLAIN PLAN FOR SELECT * FROM PER_PERSONA WHERE ESTADO=1;
SQL> SELECT * FROM PLAN_TABLE