среда, 29 августа 2018 г.

sqlplus connection string

sqlplus login/passwd@server:port/sid

Oracle query plan analysis


  1. explain plan
for select...


select plan_table_output from table(dbms_xplan.display(format =>'ALL'))  



  1. autotrace via sqlplus

set autotrace traceonly;

  1. hint gather_plan_statistics
select /*+ GATHER_PLAN_STATISTICS */  /*  xxx001*/

select sql_id, child_number
  from v$sql  
where sql_text like '%xxx001%';

select * from table(dbms_xplan.display_cursor( '50t9x60v9tsk3', 0, 'ALLSTATS LAST'))