RE: SQL Tunning - result of set autot traceonly

  • From: "Chitale, Hemant Krishnarao" <Hemant.Chitale@xxxxxx>
  • To: <ecandrietta@xxxxxxxxx>
  • Date: Tue, 12 Jul 2011 10:34:19 +0800

Firstly, you must understand that you have extracted only part of the
Execution Plan.  
An Execution Plan consists of 
A)   The Operations  --- which are presented in a tabular manner
B)    Predicate Information for some of the operations -- which shows
which predicates from the query (or transformed query) were applied at
the corresponding operation


1.) oracle ran the query from 4 to 25 or  it ran from 25 to 4 
Without knowing the execution plan, we can't really see which step was
executed first and which was executed next  and so on.
These numbers are operation IDs -- it doesn't necessarily mean that it
the actual execution was in the same sequence as these IDs.

2.) What does it mean : 'access' 
That the rows retrieved by applying this predicate.  In general, rows
may be accessed via an Index or a FullTableScan

 3.) What does it mean : 'filter'
That rows retrieved from the preceding step in the execution plan were
filtered.  Rows are filtered to eliminate those that do not meet the
query requirements

4.) Considering that the item 21 is more selective for query, where must
I put it in the statment:
It doesn't matter where you put it.   In theory, the optimizer should be
able to optimize or rewrite the query. 
Also, remember that, in some/many cases, you might know more than the
optimizer --- the simplest reason being that the table/column/index
statistics last gathered don't reflect the current nature of the data,
or for more complex reasons such as dependencies between columns etc

Hemant K Chitale 


From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Eriovaldo Andrietta
Sent: Tuesday, July 12, 2011 7:40 AM
To: ORACLE-L
Subject: SQL Tunning - result of set autot traceonly

Hi Friends,

  I have the Result from traceonly, as below.
  My doubt is:

   1.) oracle ran the query from 4 to 25 or  it ran from 25 to 4 

   2.) What does it mean : 'access' 
        Means that the oracle process went to the disk to retrieve data
?

   3.) What does it mean : 'filter'
        Means that oracle process performed a filter in the data that
was in memory (cached) ?

   4.) Considering that the item 21 is more selective for query, where
must I put it in the statment:
        at the begin of the WHERE CLAUSE or
        at the eng of the WHERE CLAUSE ?


Predicate Information (identified by operation id):

---------------------------------------------------

 

   4 - access("T1"."NUM_DOCUMENTO"="SPL"."NUM_DOCUMENTO" AND
"SPL"."NUM_ACIONAMENTO"="VW_COL_1")

   5 - access("NUM_DOCUMENTO"="T1"."NUM_DOCUMENTO")

   9 - filter("T1"."UF"='XX')

  10 - access(ROWID=ROWID)

  11 - access(ROWID=ROWID)

  12 - access(ROWID=ROWID)

  13 - access(ROWID=ROWID)

  14 - access(ROWID=ROWID)

  15 - access("T1"."UF"='RS')

  21 - filter("SPL"."STATUS"=2 AND "SPL"."DATA">=TO_DATE(' 2003-12-19
00:00:00', 'syyyy-mm-dd

              hh24:mi:ss') AND "SPL"."DATA"<=TO_DATE(' 2011-07-06
00:00:00', 'syyyy-mm-dd hh24:mi:ss'))

  23 - access("T1"."NUM_DOCUMENTO"="SC"."NUM_DOCUMENTO"(+))

  24 - filter("TC"."N1"='BRT')

  25 - access("T1"."NUM_DOCUMENTO"="TC"."NUM_DOCUMENTO")


Regards
Eriovaldo


This email and any attachments are confidential and may also be privileged.  If 
you are not the addressee, do not disclose, copy, circulate or in any other way 
use or rely on the information contained in this email or any attachments.  If 
received in error, notify the sender immediately and delete this email and any 
attachments from your system.  Emails cannot be guaranteed to be secure or 
error free as the message and any attachments could be intercepted, corrupted, 
lost, delayed, incomplete or amended.  Standard Chartered PLC and its 
subsidiaries do not accept liability for damage caused by this email or any 
attachments and may monitor email traffic.

Standard Chartered PLC is incorporated in England with limited liability under 
company number 966425 and has its registered office at 1 Aldermanbury Square, 
London, EC2V 7SB.

Standard Chartered Bank ("SCB") is incorporated in England with limited 
liability by Royal Charter 1853, under reference ZC18.  The Principal Office of 
SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the 
United Kingdom, SCB is authorised and regulated by the Financial Services 
Authority under FSA register number 114276.

If you are receiving this email from SCB outside the UK, please click 
http://www.standardchartered.com/global/email_disclaimer.html to refer to the 
information on other jurisdictions.

Other related posts: