unix query - TechRepublic
Question
May 15, 2007 at 10:22 AM
abhigoel_208

unix query

by abhigoel_208 . Updated 19 years, 1 month ago

delete from plan_table;

Explain plan SET statement_id=’XXX’ FOR
SELECT COUNT(*)
FROM po_distb_promo pdp, po_distb pd, batch_cntl bc, appt_po ap
WHERE bc.batch_i=’36496568′
AND ap.appt_i=bc.appt_i
AND pd.po_i=ap.po_i
AND pd.dept_i=bc.dept_i
AND pd.class_i=bc.class_i
AND pd.item_i=bc.item_i
AND pd.po_distb_i=pdp.po_distb_i;

column operation format a16
column options format a15
column object_name format a20
column id format 99
select lpad(‘ ‘,2*(level-1))||operation||’ ‘||options||’ ‘||object_name||’ ‘||
— decode(partition_id, NULL, ”,
— ‘PART:’||lower(partition_start||’-‘||partition_stop))||
decode(optimizer, NULL, ”, ‘ [‘||optimizer||’]’)||
decode(id,0,’ Cost=’ ||nvl(position, 0)||
‘ Rows=’ ||nvl(cardinality,0)||
‘ Bytes=’||nvl(bytes, 0)) “Query Plan”
from plan_table
where statement_id = ‘XXX’
start with id = 0 and statement_id = ‘XXX’
connect by prior id = parent_id and statement_id = ‘XXX’

This discussion is locked

All Comments