Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL deparser ?

Re: SQL deparser ?

From: Tanel Põder <tanel.poder.003_at_mail.ee>
Date: Thu, 18 May 2006 22:18:02 +0800
Message-ID: <058101c67a85$e2c79ed0$6401a8c0@porgand>


I would use a combination of explain plan's filter predicates column for getting predicate information.

Also I would set _dump_qbc_tree=1 at session level before parsing the query (10.2 only) - that dumps out the parse tree of the query, fully resolved to base tables. So there's no need to start reverse engineering column/tablename meanings from view definitions.

Note that you might get some strange inconsistencies between those two sources as the QBC tree is generated right after successfully parsing the query text into references to base tables, but the explain plan's filter predicates are unparsed from compiled cursor after transformations though.

Cheers,
Tanel.

  Hello lister,

  I am wondering if anybody knows a resource for a procedure/program that will isolate predicates for a given SQL.

  I am quite interrested in the work of Dan Tow (http://www.oreilly.com/catalog/sqltuning/) and SQL diagramming as a generic approache to tune SQL. However this method requests for an SQL of 20 tables and 50 joins to generate counts and ratio for each predicate and it is rapidily over the hundred SQL statement.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 18 2006 - 09:18:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US