Wednesday, August 24, 2011

Oracle explain plan

1. explain plan set statement_id = 'bad6' for
select a from b;

Then :

2. SELECT cardinality "Rows",
      lpad(' ',level-1)||operation||' '||
      options||' '||object_name "Plan"

CONNECT BY prior id = parent_id
       AND prior statement_id = statement_id
 START WITH id = 0
       AND statement_id = 'bad6'


2. SELECT * FROM TABLE(dbms_xplan.display('PLAN_TABLE','bad6','ALL'));

Monday, August 22, 2011

running external script in oracle sqlplus

SQL> @external.sql

Friday, August 12, 2011

Perl Dollar Dollar ($$)

Do you know what does $$ stand for in Perl?
It's the process id of the current process.

print $$;

will print the process id of the current process.

Thursday, August 4, 2011

Blog Archive