Direct Path Read waits are not showing in Elapsed time

Hi,
I'm having a question regarding interpretation of a SQL trace file. I'm on Oracle 11.2.0.1 HP/UX 64 bit.
Following is only the overall result of the trace (it is quite big).
My question is about the Direct Path Read waits which are totallizing 268s of wait but are not showing in the fetch elapsed time (49.58s) and are not showing anywhere in the trace except in the overall result.
I do not understand why it is not part of the Elapsed time...
For info, the trace is for the specific session that was performing all the required queries to display an online report. The database is accessed by the Java application using Hybernate.
The trace was obtained by the following SQL:
exec sys.dbms_monitor.serv_mod_act_trace_enable(service_name=>'SYS$USERS',waits=>true,binds=>true);Then I query the sessions to find the one created by the application.
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call     count       cpu    elapsed       disk      query    current        rows
Parse       36      0.43       0.51          0          5          0           0
Execute     62      0.01       0.01          0          0          0           0
Fetch      579      4.01      49.06       3027     153553          0        5516
total      677      4.45      49.58       3027     153558          0        5516
Misses in library cache during parse: 29
Misses in library cache during execute: 2
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                   32754        0.00          0.03
  SQL*Net message from client                 32753        2.33        232.01
  Disk file operations I/O                      179        0.00          0.02
  db file sequential read                      2979        0.54         45.72
  SQL*Net more data to client                133563        0.04          5.30
  direct path read                            34840        0.94        268.21
  SQL*Net more data from client                1075        0.00          0.02
  db file scattered read                          6        0.03          0.11
  asynch descriptor resize                       52        0.00          0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call     count       cpu    elapsed       disk      query    current        rows
Parse       25      0.00       0.02          0          0          0           0
Execute     58      0.05       0.04          0          0          0           0
Fetch      126      0.00       0.04          4        161          0         123
total      209      0.05       0.11          4        161          0         123
Misses in library cache during parse: 3
Misses in library cache during execute: 3
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  Disk file operations I/O                        1        0.00          0.00
  db file sequential read                         4        0.01          0.03
  asynch descriptor resize                        1        0.00          0.00
   37  user  SQL statements in session.
   57  internal SQL statements in session.
   94  SQL statements in session.
Trace file: oxd1ta00_ora_16542.trc
Trace file compatibility: 11.1.0.7
Sort options: default
       1  session in tracefile.
      37  user  SQL statements in trace file.
      57  internal SQL statements in trace file.
      94  SQL statements in trace file.
      57  unique SQL statements in trace file.
  241517  lines in trace file.
     568  elapsed seconds in trace file.Thanks
Christophe

Christophe Lize wrote:
Closing this thread even if it's not answered...Sorry, I don't have time to test this myself now, but you shouldn't mark this thread as answered if it is not, because other people might find it and think they find an answer if they have a similar question.
I suggest you try the following to narrow down things:
1. Open the RAW trace file and check the cursor numbers of the "direct path reads" - check if you can find any references for those cursor numbers manually. The cursor numbers are those numbers behind the WAIT #<xx>, and you can check if you find any other entry unequal to WAIT #<xx> with the same #<xx>, for example EXEC #<xx> or FETCH #<xx>
A short primer on how to interpret the raw trace file can also be found in MOS document 39817.1
2. Run the RAW trace file through alternative free trace file analyzers like SQLDeveloper (yes it can process raw trace files), OraSRP or Christian Antognini's TVD$XTAT. If you have My Oracle Support access you can also try Oracle's own extended Trace Analyzer (TRCA / TRCANLZR). See MOS Note 224270.1
Check if these tools tell you more about your specific wait event and oddities with the trace file in general.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
Co-author of the "OakTable Expert Oracle Practices" book:
http://www.apress.com/book/view/1430226684
http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684

Similar Messages

  • Regarding 'Direct Path Read' waits

    As we all know, direct path read waits is a new feature in Oracle 11g. From Oracle Documents or others' articles, when it is full table scan, direct path read occured. But why it occured?  I don't know clearly.
    Below is Oracle Document description:
    http://docs.oracle.com/cd/E18283_01/server.112/e17110/waitevents003.htm#sthref3849
    During Direct Path operations the data is asynchronously read from the database files. At some stage the session needs to make sure that all outstanding asynchronous I/O have been completed to disk. This can also happen if during a direct read no more slots are available to store outstanding load requests (a load request could consist of multiple I/Os).
    Question:
    1. During Direct Path operations the data is asynchronously read from the database files.  >> what does this statement mean? what's ''asynchronously read'?
    2. describe above description for me in details.
    3. who can clearly explain 'why direct path read waits occur' for me?
    Thanks in advance.
    Lonion

    Lonion wrote:
    Question:
    1. During Direct Path operations the data is asynchronously read from the database files.  >> what does this statement mean? what's ''asynchronously read'?
    2. describe above description for me in details.
    3. who can clearly explain 'why direct path read waits occur' for me?
    If you want to get very technical, Frits Hoogland has written lots of stuff about the implementation:
    http://fritshoogland.wordpress.com/2013/05/09/direct-path-read-and-fast-full-index-scans/
    http://fritshoogland.wordpress.com/2013/01/04/oracle-11-2-and-the-direct-path-read-event/
    http://fritshoogland.wordpress.com/2012/12/27/oracle-11-2-0-1-and-the-kfk-async-disk-io-wait-event/
    http://www.ukoug.org/what-we-offer/library/about-multiblock-reads/about-multiblock-reads.pdf
    Regards
    Jonathan Lewis

  • Wait events 'direct path write'  and 'direct path read'

    Hi,
    We have a query which is taking more that 2 min. It's a 9.2.0.7 database. We took the trace/tkprof of the query,and identified that there are so manay 'direct path write' and 'direct path read' wait events in the trace file.
    WAIT #3: nam='direct path write' ela= 5 p1=201 p2=70710 p3=15
    WAIT #3: nam='direct path read' ela= 170 p1=201 p2=71719 p3=15
    In the above, "p1=201" is a file_id, but we could not find any data file, temp file, control file with that id# 201.
    Can you please let us know what's "p1=201" here, how to identify the file which is causing the issue.
    Thanks
    Sravan

    What does:
    show parameter db_filesreturn? My guess, is that it returns 200.
    The direct file read and direct file write events are reads and writes to TEMP tablespace. In those wait events, the file# is reported as db_files+temp file id. So, 201 means temp file #1.
    Now, as to your actual performance problem.
    Without seeing the SQL and the corresponding execution plan, it's impossible to be sure. However, the most common causes of temp writes are sort operations and group by operations.
    If you decide to post your SQL and execution plan, please be sure to make it readable by formatting it. Information on how to do so can be found here.
    Hope that helps,
    -Mark
    Edited by: mbobak on May 1, 2011 1:50 AM

  • Serial table scan with direct path read compared to db file scattered read

    Hi,
    The environment
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
    8K block size
    db_file_multiblock_read_count is 128
    show sga
    Total System Global Area 1.6702E+10 bytes
    Fixed Size                  2219952 bytes
    Variable Size            7918846032 bytes
    Database Buffers         8724152320 bytes
    Redo Buffers               57090048 bytes
    16GB of SGA with 8GB of db buffer cache.
    -- database is built on Solid State Disks
    -- SQL trace and wait events
    DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true )
    -- The underlying table is called tdash. It has 1.7 Million rows based on data in all_objects. NO index
    TABLE_NAME                             Rows Table Size/MB      Used/MB    Free/MB
    TDASH                             1,729,204        15,242       15,186         56
    TABLE_NAME                     Allocated blocks Empty blocks Average space/KB Free list blocks
    TDASH                                 1,943,823        7,153              805                0
    Objectives
    To show that when serial scans are performed on database built on Solid State Disks (SSD) compared to Magnetic disks (HDD), the performance gain is far less compared to random reads with index scans on SSD compared to HDD
    Approach
    We want to read the first 100 rows of tdash table randomly into buffer, taking account of wait events and wait times generated. The idea is that on SSD the wait times will be better compared to HDD but not that much given the serial nature of table scans.
    The code used
    ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_with_tdash_ssdtester_noindex';
    DECLARE
            type array is table of tdash%ROWTYPE index by binary_integer;
            l_data array;
            l_rec tdash%rowtype;
    BEGIN
            SELECT
                    a.*
                    ,RPAD('*',4000,'*') AS PADDING1
                    ,RPAD('*',4000,'*') AS PADDING2
            BULK COLLECT INTO
            l_data
            FROM ALL_OBJECTS a;
            DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
            FOR rs IN 1 .. 100
            LOOP
                    BEGIN
                            SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
                    EXCEPTION
                      WHEN NO_DATA_FOUND THEN NULL;
                    END;
            END LOOP;
    END;
    /Server is rebooted prior to any tests
    Whern run as default, the optimizer (although some attribute this to the execution engine) chooses direct path read into PGA in preference to db file scattered read.
    With this choice it takes 6,520 seconds to complete the query. The results are shown below
    SQL ID: 78kxqdhk1ubvq
    Plan Hash: 1148949653
    SELECT *
    FROM
    TDASH WHERE OBJECT_ID = :B1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          2         47          0           0
    Execute    100      0.00       0.00          1         51          0           0
    Fetch      100     10.88    6519.89  194142802  194831012          0         100
    total      201     10.90    6519.90  194142805  194831110          0         100
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 96  (SSDTESTER)   (recursive depth: 1)
    Rows     Row Source Operation
          1  TABLE ACCESS FULL TDASH (cr=1948310 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   TABLE ACCESS   MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      Disk file operations I/O                        3        0.00          0.00
      db file sequential read                         2        0.00          0.00
      direct path read                          1517504        0.05       6199.93
      asynch descriptor resize                      196        0.00          0.00
    DECLARE
            type array is table of tdash%ROWTYPE index by binary_integer;
            l_data array;
            l_rec tdash%rowtype;
    BEGIN
            SELECT
                    a.*
                    ,RPAD('*',4000,'*') AS PADDING1
                    ,RPAD('*',4000,'*') AS PADDING2
            BULK COLLECT INTO
            l_data
            FROM ALL_OBJECTS a;
            DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
            FOR rs IN 1 .. 100
            LOOP
                    BEGIN
                            SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
                    EXCEPTION
                      WHEN NO_DATA_FOUND THEN NULL;
                    END;
            END LOOP;
    END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      3.84       4.03        320      48666          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        1      3.84       4.03        320      48666          0           1
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 96  (SSDTESTER)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00
    SQL ID: 9babjv8yq8ru3
    Plan Hash: 0
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 96  (SSDTESTER)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      2      3.84       4.03        320      48666          0           2
    Fetch        0      0.00       0.00          0          0          0           0
    total        3      3.84       4.03        320      48666          0           2
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.00          0.00
      log file sync                                   1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        9      0.01       0.00          2         47          0           0
    Execute    129      0.01       0.00          1         52          2           1
    Fetch      140     10.88    6519.89  194142805  194831110          0         130
    total      278     10.91    6519.91  194142808  194831209          2         131
    Misses in library cache during parse: 9
    Misses in library cache during execute: 8
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                         5        0.00          0.00
      Disk file operations I/O                        3        0.00          0.00
      direct path read                          1517504        0.05       6199.93
      asynch descriptor resize                      196        0.00          0.00
      102  user  SQL statements in session.
       29  internal SQL statements in session.
      131  SQL statements in session.
        1  statement EXPLAINed in this session.
    Trace file: mydb_ora_16394_test_with_tdash_ssdtester_noindex.trc
    Trace file compatibility: 11.1.0.7
    Sort options: default
           1  session in tracefile.
         102  user  SQL statements in trace file.
          29  internal SQL statements in trace file.
         131  SQL statements in trace file.
          11  unique SQL statements in trace file.
           1  SQL statements EXPLAINed using schema:
               ssdtester.plan_table
                 Schema was specified.
                 Table was created.
                 Table was dropped.
    1531657  lines in trace file.
        6520  elapsed seconds in trace file.I then force the query not to use direct path read by invoking
    ALTER SESSION SET EVENTS '10949 trace name context forever, level 1'  -- No Direct path read  ;In this case the optimizer uses db file scattered read predominantly and the query takes 4,299 seconds to finish which is around 34% faster than using direct path read (default).
    The report is shown below
    SQL ID: 78kxqdhk1ubvq
    Plan Hash: 1148949653
    SELECT *
    FROM
    TDASH WHERE OBJECT_ID = :B1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          2         47          0           0
    Execute    100      0.00       0.00          2         51          0           0
    Fetch      100    143.44    4298.87  110348670  194490912          0         100
    total      201    143.45    4298.88  110348674  194491010          0         100
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 96  (SSDTESTER)   (recursive depth: 1)
    Rows     Row Source Operation
          1  TABLE ACCESS FULL TDASH (cr=1944909 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   TABLE ACCESS   MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      Disk file operations I/O                        3        0.00          0.00
      db file sequential read                    129759        0.01         17.50
      db file scattered read                    1218651        0.05       3770.02
      latch: object queue header operation            2        0.00          0.00
    DECLARE
            type array is table of tdash%ROWTYPE index by binary_integer;
            l_data array;
            l_rec tdash%rowtype;
    BEGIN
            SELECT
                    a.*
                    ,RPAD('*',4000,'*') AS PADDING1
                    ,RPAD('*',4000,'*') AS PADDING2
            BULK COLLECT INTO
            l_data
            FROM ALL_OBJECTS a;
            DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
            FOR rs IN 1 .. 100
            LOOP
                    BEGIN
                            SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
                    EXCEPTION
                      WHEN NO_DATA_FOUND THEN NULL;
                    END;
            END LOOP;
    END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      3.92       4.07        319      48625          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        1      3.92       4.07        319      48625          0           1
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 96  (SSDTESTER)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00
    SQL ID: 9babjv8yq8ru3
    Plan Hash: 0
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 96  (SSDTESTER)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      2      3.92       4.07        319      48625          0           2
    Fetch        0      0.00       0.00          0          0          0           0
    total        3      3.92       4.07        319      48625          0           2
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.00          0.00
      log file sync                                   1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        9      0.01       0.00          2         47          0           0
    Execute    129      0.00       0.00          2         52          2           1
    Fetch      140    143.44    4298.87  110348674  194491010          0         130
    total      278    143.46    4298.88  110348678  194491109          2         131
    Misses in library cache during parse: 9
    Misses in library cache during execute: 8
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                    129763        0.01         17.50
      Disk file operations I/O                        3        0.00          0.00
      db file scattered read                    1218651        0.05       3770.02
      latch: object queue header operation            2        0.00          0.00
      102  user  SQL statements in session.
       29  internal SQL statements in session.
      131  SQL statements in session.
        1  statement EXPLAINed in this session.
    Trace file: mydb_ora_26796_test_with_tdash_ssdtester_noindex_NDPR.trc
    Trace file compatibility: 11.1.0.7
    Sort options: default
           1  session in tracefile.
         102  user  SQL statements in trace file.
          29  internal SQL statements in trace file.
         131  SQL statements in trace file.
          11  unique SQL statements in trace file.
           1  SQL statements EXPLAINed using schema:
               ssdtester.plan_table
                 Schema was specified.
                 Table was created.
                 Table was dropped.
    1357958  lines in trace file.
        4299  elapsed seconds in trace file.I note that there are 1,517,504 waits with direct path read with total time of nearly 6,200 seconds. In comparison with no direct path read, there are 1,218,651 db file scattered read waits with total wait time of 3,770 seconds. My understanding is that direct path read can use single or multi-block read into the PGA. However db file scattered reads do multi-block read into multiple discontinuous SGA buffers. So it is possible given the higher number of direct path waits that the optimizer cannot do multi-block reads (contigious buffers within PGA) and hence has to revert to single blocks reads which results in more calls and more waits?.
    Appreciate any advise and apologies for being long winded.
    Thanks,
    Mich

    Hi Charles,
    I am doing your tests for t1 table using my server.
    Just to clarify my environment is:
    I did the whole of this test on my server. My server has I7-980 HEX core processor with 24GB of RAM and 1 TB of HDD SATA II for test/scratch backup and archive. The operating system is RHES 5.2 64-bit installed on a 120GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive.
    Oracle version installed was 11g Enterprise Edition Release 11.2.0.1.0 -64bit. The binaries were created on HDD. Oracle itself was configured with 16GB of SGA, of which 7.5GB was allocated to Variable Size and 8GB to Database Buffers.
    For Oracle tablespaces including SYS, SYSTEM, SYSAUX, TEMPORARY, UNDO and redo logs, I used file systems on 240GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive. With 4K Random Read at 53,500 IOPS and 4K Random Write at 56,000 IOPS (manufacturer’s figures), this drive is probably one of the fastest commodity SSDs using NAND flash memory with Multi-Level Cell (MLC). Now my T1 table created as per your script and has the following rows and blocks (8k block size)
    SELECT
      NUM_ROWS,
      BLOCKS
    FROM
      USER_TABLES
    WHERE
      TABLE_NAME='T1';
      NUM_ROWS     BLOCKS
      12000000     178952which is pretty identical to yours.
    Then I run the query as brelow
    set timing on
    ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_bed_T1';
    ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
    SELECT
            COUNT(*)
    FROM
            T1
    WHERE
            RN=1;
    which gives
      COUNT(*)
         60000
    Elapsed: 00:00:05.29
    tkprof output shows
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.02       5.28     178292     178299          0           1
    total        4      0.02       5.28     178292     178299          0           1
    Compared to yours:
    Fetch        2      0.60       4.10     178493     178498          0           1
    It appears to me that my CPU utilisation is by order of magnitude better but my elapsed time is worse!
    Now the way I see it elapsed time = CPU time + wait time. Further down I have
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=178299 pr=178292 pw=0 time=0 us)
      60000   TABLE ACCESS FULL T1 (cr=178299 pr=178292 pw=0 time=42216 us cost=48697 size=240000 card=60000)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (AGGREGATE)
      60000    TABLE ACCESS   MODE: ANALYZED (FULL) OF 'T1' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       3        0.00          0.00
      SQL*Net message from client                     3        0.00          0.00
      Disk file operations I/O                        3        0.00          0.00
      direct path read                             1405        0.00          4.68
    Your direct path reads are
      direct path read                             1404        0.01          3.40Which indicates to me you have faster disks compared to mine, whereas it sounds like my CPU is faster than yours.
    With db file scattered read I get
    Elapsed: 00:00:06.95
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      1.22       6.93     178293     178315          0           1
    total        4      1.22       6.94     178293     178315          0           1
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=178315 pr=178293 pw=0 time=0 us)
      60000   TABLE ACCESS FULL T1 (cr=178315 pr=178293 pw=0 time=41832 us cost=48697 size=240000 card=60000)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (AGGREGATE)
      60000    TABLE ACCESS   MODE: ANALYZED (FULL) OF 'T1' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      Disk file operations I/O                        3        0.00          0.00
      db file sequential read                         1        0.00          0.00
      db file scattered read                       1414        0.00          5.36
      SQL*Net message from client                     2        0.00          0.00
    compared to your
      db file scattered read                       1415        0.00          4.16On the face of it with this test mine shows 21% improvement with direct path read compared to db scattered file read. So now I can go back to re-visit my original test results:
    First default with direct path read
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          2         47          0           0
    Execute    100      0.00       0.00          1         51          0           0
    Fetch      100     10.88    6519.89  194142802  194831012          0         100
    total      201     10.90    6519.90  194142805  194831110          0         100
    CPU ~ 11 sec, elapsed ~ 6520 sec
    wait stats
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      direct path read                          1517504        0.05       6199.93
    roughly 0.004 sec for each I/ONow with db scattered file read I get
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          2         47          0           0
    Execute    100      0.00       0.00          2         51          0           0
    Fetch      100    143.44    4298.87  110348670  194490912          0         100
    total      201    143.45    4298.88  110348674  194491010          0         100
    CPU ~ 143 sec, elapsed ~ 4299 sec
    and waits:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                    129759        0.01         17.50
      db file scattered read                    1218651        0.05       3770.02
    roughly 17.5/129759 = .00013 sec for single block I/O and  3770.02/1218651 = .0030 for multi-block I/ONow my theory is that the improvements comes from the large buffer cache (8320MB) inducing it to do some read aheads (async pre-fetch). Read aheads are like quasi logical I/Os and they will be cheaper compared to physical I/O. When there is large buffer cache and read aheads can be done then using buffer cache is a better choice than PGA?
    Regards,
    Mich

  • Direct path read caused by direct path insert?

    Oracle 9.2
    ========
    Consider this INSERT statement
    INSERT /*+ APPEND USE_HASH*/ INTO schema.tablename (...)
    SELECT * FROM view_tablename;
    This statement takes about 30 minutes to complete.
    If I look at the v$session_wait, I can see that the session waits denoting db file scattered read (which is understandable). However, at the very end of the 30-minute wait, the v$session_wait view shows that it is waiting denoting direct path read. I want to understand how can a direct path INSERT (or for that matter a simple INSERT statement) can cause a direct path read wait. Can you show me some doc which expalain this in more detail than Oracle doc? Thanks in advance.

    Hmm....ok, well,first, there's a problem w/ the hint specification.
    The USE_HASH hint makes no sense as a hint to the insert statement. It only makes sense in the context of a select statement. Also, it should specify a table alias. So, you could have something like:
    insert /*+ APPEND */.into some_tab
    select /*+ use_hash(tab_alias) */ col1,col2,col3 from .....
    Now, as to the question of direct path read:
    The direct path read event indicates a disk sort. So, it's likely the source of the direct path read wait was due to sorting in the processing of the select statement. I can't imagine how the insert would cause direct path read.
    Hope that helps,
    -Mark

  • WAIT = 'direct path read temp' in session

    Hi;
    select * from v$version
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    In our development system, a query "insert into X" using a couple of session global temporary tables, was running under 5 minuts, is now taking 40 minuts!
    Sql Developer Sessions shows a wait: "direct path read temp"
    Any hints on that might cause this, and possible solutions?
    Trace file of the session looks like this:
    *** 2013-03-18 15:56:22.871
    WAIT #20: nam='direct path read temp' ela= 106 file number=201 first dba=46685 block cnt=31 obj#=61321 tim=1363614982871399
    *** 2013-03-18 15:56:25.354
    WAIT #20: nam='direct path read temp' ela= 90 file number=201 first dba=46336 block cnt=31 obj#=61321 tim=1363614985354148
    *** 2013-03-18 15:56:28.098
    WAIT #20: nam='direct path read temp' ela= 86 file number=201 first dba=46367 block cnt=31 obj#=61321 tim=1363614988098575
    *** 2013-03-18 15:56:32.302
    WAIT #20: nam='direct path read temp' ela= 112 file number=201 first dba=69438 block cnt=31 obj#=61321 tim=1363614992302296
    WAIT #20: nam='direct path read temp' ela= 93 file number=201 first dba=69469 block cnt=31 obj#=61321 tim=1363614992302484
    WAIT #20: nam='direct path read temp' ela= 95 file number=201 first dba=68030 block cnt=31 obj#=61321 tim=1363614992302888
    WAIT #20: nam='direct path read temp' ela= 93 file number=201 first dba=66719 block cnt=31 obj#=61321 tim=1363614992303265
    WAIT #20: nam='direct path read temp' ela= 107 file number=201 first dba=65726 block cnt=31 obj#=61321 tim=1363614992303657
    WAIT #20: nam='direct path read temp' ela= 94 file number=201 first dba=64702 block cnt=31 obj#=61321 tim=1363614992304037
    WAIT #20: nam='direct path read temp' ela= 97 file number=201 first dba=63709 block cnt=31 obj#=61321 tim=1363614992304421
    WAIT #20: nam='direct path read temp' ela= 94 file number=201 first dba=62623 block cnt=31 obj#=61321 tim=1363614992304820
    WAIT #20: nam='direct path read temp' ela= 111 file number=201 first dba=61471 block cnt=31 obj#=61321 tim=1363614992305227
    WAIT #20: nam='direct path read temp' ela= 121 file number=201 first dba=60606 block cnt=31 obj#=61321 tim=1363614992305764
    WAIT #20: nam='direct path read temp' ela= 100 file number=201 first dba=59392 block cnt=31 obj#=61321 tim=1363614992306175
    WAIT #20: nam='direct path read temp' ela= 101 file number=201 first dba=58589 block cnt=31 obj#=61321 tim=1363614992306579
    WAIT #20: nam='direct path read temp' ela= 98 file number=201 first dba=57503 block cnt=31 obj#=61321 tim=1363614992306965
    WAIT #20: nam='direct path read temp' ela= 93 file number=201 first dba=56510 block cnt=31 obj#=61321 tim=1363614992307342
    WAIT #20: nam='direct path read temp' ela= 94 file number=201 first dba=55296 block cnt=31 obj#=61321 tim=1363614992307742
    WAIT #20: nam='direct path read temp' ela= 96 file number=201 first dba=54272 block cnt=31 obj#=61321 tim=1363614992308149
    WAIT #20: nam='direct path read temp' ela= 131 file number=201 first dba=53407 block cnt=31 obj#=61321 tim=1363614992308651
    WAIT #20: nam='direct path read temp' ela= 108 file number=201 first dba=52480 block cnt=31 obj#=61321 tim=1363614992309129
    WAIT #20: nam='direct path read temp' ela= 99 file number=201 first dba=52511 block cnt=31 obj#=61321 tim=1363614992309273

    Tkprof output... notice the big values for direct path write temp and direct path read temp values!
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    callcount cpu elapsed disk query current rows
    Parse 2 0.17 0.18 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 0
    Fetch 4 206.24 207.66 18960 755 21 8
    total 8 206.42 207.84 18960 755 21 8
    Misses in library cache during parse: 2
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    SQL*Net message to client 5 0.00 0.00
    SQL*Net message from client 5 11.01 19.27
    db file sequential read 6 0.00 0.00
    Disk file operations I/O 15 0.00 0.00
    asynch descriptor resize 84 0.00 0.00
    direct path write temp 1264 0.19 1.25
    direct path read temp 1264 0.00 0.04
    control file sequential read 42 0.00 0.00
    db file single write 3 0.00 0.00
    control file parallel write 9 0.00 0.00
    rdbms ipc reply 2 0.00 0.00
    local write wait 12 0.00 0.00
    log file sync 2 0.00 0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 85 0.04 0.04 0 0 0 0
    Execute 899 0.18 0.24 22 47 7 4
    Fetch 1393 0.04 0.69 204 3200 0 7002
    total 2377 0.28 0.98 226 3247 7 7006
    Misses in library cache during parse: 55
    Misses in library cache during execute: 51
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    db file sequential read 206 0.03 0.65
    latch: shared pool 4 0.00 0.00
    Disk file operations I/O 2 0.00 0.00
    db file scattered read 3 0.03 0.04
    5 user SQL statements in session.
    896 internal SQL statements in session.
    901 SQL statements in session.
    Trace file: SXDB_ora_25080.trc
    Trace file compatibility: 11.1.0.7
    Sort options: default
    1 session in tracefile.
    5 user SQL statements in trace file.
    896 internal SQL statements in trace file.
    901 SQL statements in trace file.
    41 unique SQL statements in trace file.
    21517 lines in trace file.
    217 elapsed seconds in trace file.
    Edited by: PauloSMO on 19/Mar/2013 11:36

  • New features, e.g., blur path and select focus, are not showing up in my PS drop down menus

    Although I've downloaded the CC PS 2014 updates the new features, e.g., blur path and select focus, are not showing up in my PS drop down menus - anybody know why and what I need to do?
    <moved from downloading,installing,setting up - kglad>

    Are you sure you understand the Cloud License concept?
    You are entitled to keep Photoshop CC and install Photoshop CC 2014, so CC 2014 is not connected with additional costs and the time it takes to install the new version of Photoshop should not be that much of a imposition, should it?

  • Oracle direct path read IO size

    Hello!
    I am confused a little with IO size. I am running 11.2.0.3 on Oracle Linux x64 6.2. Block_size=8K, MULTIBOCK_READ_COUNT=128
    Database is Single Instance and is using ASM grid. ASM AU =1M
    As a test I am running a simple query against large table with 1.5Bln rows.
    select /*+ PARALLEL (STOCK_DAY 10) */ count(*) from stock_day where cstast='NA'
    STAT #140582923121480 id=1 cnt=0 pid=0 pos=1 obj=0 op='SORT AGGREGATE (cr=0 pr=0 pw=0 time=0 us)'
    STAT #140582923121480 id=2 cnt=0 pid=1 pos=1 obj=0 op='PX COORDINATOR (cr=0 pr=0 pw=0 time=0 us)'
    STAT #140582923121480 id=3 cnt=0 pid=2 pos=1 obj=0 op='PX SEND QC (RANDOM) :TQ10000 (cr=0 pr=0 pw=0 time=0 us)'
    STAT #140582923121480 id=4 cnt=0 pid=3 pos=1 obj=0 op='SORT AGGREGATE (cr=0 pr=0 pw=0 time=27 us)'
    STAT #140582923121480 id=5 cnt=2301843 pid=4 pos=1 obj=0 op='PX PARTITION LIST ALL PARTITION: 1 762 (cr=68020 pr=68393 pw=0 time=29346414 us cost=303766 size=669864369 card=223288123)'
    STAT #140582923121480 id=6 cnt=2301843 pid=5 pos=1 obj=1464816 op='TABLE ACCESS FULL STOCK_DAY PARTITION: 1 762 (cr=68020 pr=68393 pw=0 time=24376609 us cost=303766 size=669864369 card=223288123)'
    when I am trying to measure disk io statistics with iostat it shows that Oracle is issuing a 32K direct path read requests to ASM LUNs. Why? Why not 1M?
    Thank you in advance!
    Regards,
    Kirill
    Edited by: Kirill.Boyko on Jan 31, 2013 12:53 PM

    This is a kind of histogram for one parallel session wait events
    select session_state,event,p3,count(1) from V$active_session_history ash where ash.session_id=1904 and ash.session_serial#=24381
    group by session_state,event,p3
    order by session_state,event,p3
    session
    state event P3 COUNT
    ON CPU          5     1
    ON CPU          9     8
    ON CPU          15     1
    ON CPU          115     10
    ON CPU          123     1
    ON CPU          124     2
    ON CPU          126     23
    ON CPU          128     77
    ON CPU          512     1
    WAITING     direct path read     5     2
    WAITING     direct path read     8     2
    WAITING     direct path read     9     7
    WAITING     direct path read     15     3
    WAITING     direct path read     67     1
    WAITING     direct path read     101     1
    WAITING     direct path read     115     18
    WAITING     direct path read     124     5
    WAITING     direct path read     126     35
    WAITING     direct path read     127     1
    WAITING     direct path read     128     97
    in fact as you can see almost all direct path reads are done with io size > 900K. Total size of information read by process~160M
    strace shows a lot of calls to read function. If we divide 160M/78000 reads we will get about 2K per request which is strange
    % time seconds usecs/call calls errors syscall
    98.61 0.212144 3 78356 read
    0.93 0.002000 32 63 58 semtimedop
    0.29 0.000624 208 3 munmap
    0.12 0.000263 0 7407 gettimeofday
    according to iostat we see that we are reading from each LUN with requests of 32K
    Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
    xvda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
    xvdb 4.00 0.00 2946.00 1.00 92.01 0.00 63.94 90.60 30.93 0.33 96.00
    xvde 1.00 0.00 2466.00 0.00 77.00 0.00 63.95 49.84 20.64 0.33 80.90
    xvdf 5.00 0.00 2694.00 1.00 84.15 0.01 63.95 69.68 25.37 0.32 87.20
    xvdg 2.00 0.00 2798.00 0.00 87.41 0.00 63.98 91.95 33.81 0.35 97.40
    xvdj 3.00 0.00 2676.00 1.00 83.45 0.03 63.87 38.83 14.72 0.31 82.10
    xvdk 4.00 0.00 2951.00 0.00 92.14 0.00 63.95 100.21 32.42 0.31 91.00
    xvdl 3.00 0.00 2735.00 1.00 85.45 0.03 63.98 56.04 21.14 0.32 86.50
    Why linux is splitting Oracle requests and how to avoid that?
    Regards,
    Kirill

  • Huge long time direct path read temp, but pga size is enough, one block p3

    Hi Gurus,
    Can you please kindly provide some points on my below questions. thanks
    my env
    select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    OS: Linux 4 2.6.39-100.5.1.el5uek
    session operation: update a partition which have 4 partitions and total 16G
    session trace info:
    the session keep at active status and waiting for below wait event for more than 70 hours, and os iostats and cpu are almost idle on most time.
    WAIT #8: nam='direct path read temp' ela= 7615 file number=202 first dba=105072 block cnt=1 obj#=104719 tim=1344850223569499
    WAIT #8: nam='direct path read temp' ela= 5989 file number=202 first dba=85264 block cnt=1 obj#=104719 tim=1344850392833257
    WAIT #8: nam='direct path read temp' ela= 319 file number=202 first dba=85248 block cnt=1 obj#=104719 tim=1344850399563184
    WAIT #8: nam='direct path read temp' ela= 358 file number=202 first dba=85232 block cnt=1 obj#=104719 tim=1344850406016899
    WAIT #8: nam='direct path read temp' ela= 349 file number=202 first dba=85216 block cnt=1 obj#=104719 tim=1344850413023792
    WAIT #8: nam='direct path read temp' ela= 7975 file number=202 first dba=85200 block cnt=1 obj#=104719 tim=1344850419495645
    WAIT #8: nam='direct path read temp' ela= 331 file number=202 first dba=85184 block cnt=1 obj#=104719 tim=1344850426233450
    WAIT #8: nam='direct path read temp' ela= 2641 file number=202 first dba=82880 block cnt=1 obj#=104719 tim=1344850432699800
    pgastat:
    NAME VALUE/1024/1024 UNIT
    aggregate PGA target parameter 18432 bytes
    aggregate PGA auto target 16523.1475 bytes
    global memory bound 1024 bytes
    total PGA inuse 75.7246094 bytes
    total PGA allocated 162.411133 bytes
    maximum PGA allocated 514.130859 bytes
    total freeable PGA memory 64.625 bytes
    PGA memory freed back to OS 40425.1875 bytes
    total PGA used for auto workareas 2.75195313 bytes
    maximum PGA used for auto workareas 270.407227 bytes
    total PGA used for manual workareas 0 bytes
    NAME VALUE/1024/1024 UNIT
    maximum PGA used for manual workareas 24.5429688 bytes
    bytes processed 110558.951 bytes
    extra bytes read/written 15021.2559 bytes
    Most operation in PGA via query on V$SQL_WORKAREA_ACTIVE
    IDX maintainenance (sort)
    My questions:
    1. why 'direct path read temp' just read one block every time, my understanding is this event can read one block and multiple blocks at one read call, why it keep read one block in my session?
    2. my pga size is big enough, why this operation can not be treated with in PGA memory, instead of read block from disk into temp tablespace?
    Thanks for you inputs.
    Roy

    951241 wrote:
    since the session(which was from hard code application) is completed.First of all, you showed wait events from sql trace in the first post. Is the tracing was disabled in the latest execution?
    >
    I just generated the AWR for that period, as get long elapsed time SQL as following
    Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id
    3,075.35 0 85.10 91.03 8.68 duhz2wtduz709
    524.11 1 524.11 14.50 99.29 0.30 3cpa9fxny9j35
    so I get execution plan as below for these two SQL,
    select * from table(dbms_xplan.display_awr('&v_sql_id')); duhz2wtduz709
    PLAN_TABLE_OUTPUT
    | Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT  |             |       |       |     4 (100)|          |
    |   1 |  UPDATE           | WORK_PAY_LINE |       |       |            |          |
    |   2 |   INDEX RANGE SCAN| WORK_PAY_LINE |     1 |    37 |     3   (0)| 00:00:01 |
    Note
    - automatic DOP: Computed Degree of Parallelism is 1 because of parallel thresholdI am not sure the why elapsed time in AWR is different with time in execution plan. Column "Time" in an execution plan is estimated time. In this execution plan Oracle expects to get 1 row, estimated time is 1 sec.
    So, you need to check why estimated cardinality is such low, check statistics on the table WORK_PAY_LINE.
    You update 10Gb from 16Gb table via Index Range Scan, it looks inefficient here by two reasons:
    1. when a table updated via Index Range Scan optimized index maintenance is used. As a result some amount (significant in your case) of workareas is required. Required size depends on size and number of updated indexes and "global memory bound", 1Gb in your case.
    2. if required table buffers will not be found in the cache it will be read from disk by single block reads. If you would use Full Table Scan then buffers for update most likely will be found in the cache because before it read by multiblock reads during Full Table Scan.
    Figures from your AWR indicate, that only ~ 9% the session waited for I/O and 91% it worked and used CPU
    Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id
    3,075.35 0 85.10 91.03 8.68 duhz2wtduz709 This amount of CPU time partially required for UPDATE 10Gb of data, partially for sorting during optimized index maintenance.
    I would propose to use Table Full Scan here.
    Also you can play around and create fake trigger on update, it will make impossible to use optimized index maintenance, usual index maintenance will be used. As a result you can check the same update with the same execution plan (with Index Range Scan) but without optimized index maintenance and "direct path .. temp" wait events.
    Alexander Anokhin
    http://alexanderanokhin.wordpress.com/

  • In IPhoto I changed movie dates after thumb nails were created in IMovie but the new dates are not showing up in IMovie.  Is there someway to refresh the IPhoto event in IMovie?

    Background:  I'm transferring file folders from a Visa laptop via an external hard drive to my IMac.  In the folders are photos and videos from different cameras.  SO I first tried to import to IMovie but it would not recognize any of the files.  So then I imported into IPhoto and both photos and videos were imported and I created events for each folder.  When I first opened IMovie I had to wait for it to create "thumb nails".  Then I could view the events in IMovie BUT the video clips are not together because they have vastly different dates and are mixed with videos from other events.  I looked at the dates and said I can fix that in IPhoto which i did but those new dates are not showing up in IMovie.    I think I need to somehow refresh the event data that Imovie is using but have not found how to do that in either IPhoto or IMovie. 
    I'm doing this on three events with about 100 photos and videos.  But I have many 1000s more to do so need to know how to either fix this or delete these events, reimport, change the dates, then open again in IMovie.   I'm sure that would work but I can't understand why changing the dates in IPhoto is not being reflected in IMovie.  
    Appreciate any tips or pointers.
    OBTW this is my first question as a first time Apple owner. 

    It was suggested I move this question to IPhoto or IMovie which I did. 
    Well moving to a different discussion group did not provide an answer to this question either. But what I finally did was import one batch of photos and videos into IPhoto for a given day at a time. Working with these I could change the date and times in order to get them in the original sequench taken. Then I would create an album with that batch. These would all be on the same day (IMove was closed for this phase). Then I would open IMovie, generate the thumbnails for that album, and select the album I had created. This was necessary because the importing process in IPhoto was using incorrect dates for my video so it was a real struggle finding them in IMove until I developed this approach.
    I believe that this whole process was so screwy because I was importing from an external hard drive not a camera. I had these photos on a PC and did not have the original cameras to use to import directly which I am fairly sure would have made this easier!

  • Query Tuning (sequential read + direct path read/write temp)

    Following query takes nearly 10 minutes under 10.2.0.2 on WIN2K3 to execute but I am sure there would be an alternate to tune it further.
    Major waits are 'db file sequential read' and 'direct path read temp' in addition to 'direct path write temp'
    Increasing/tuning the work_area_policy/sort_area_size would help? moving the tables to faster disk would reduce PIO causing sequential read, query re-writing would prove to be helpful?.
    Below is the tkprof:
    SELECT
      P.PER_ID
      , CL.DESCR
      , P.ENG_NAME
      , P.ARA_NAME
      , P.NATION
      , P.ADDR
      , ('Mob:' || NVL(P.MOB, '') || ', Home:' || NVL(P.HOME, '') || ', Bus.:' || NVL(P.BUS, '') || ', Fax:' || NVL(P.FAX, '')) PHONE
      , SUM(CASE
              WHEN FT.FT_TYPE_FLG IN ('BS','BX','AD','AX') THEN FT.CUR_AMT
            ELSE 0
            END) BILL
      , SUM(CASE
              WHEN FT.FT_TYPE_FLG IN ('PS','PX') THEN FT.CUR_AMT * -1
            ELSE 0
            END) PAY
      , SUM(FT.CUR_AMT) DUE
      , SUM(CASE
              WHEN FT.FREEZE_DTTM > '03-JUN-08' THEN
                  CASE WHEN FT.FT_TYPE_FLG IN ('PS','PX') THEN FT.CUR_AMT * -1
                  ELSE 0
                  END
            ELSE 0
            END) PAY_02JUN
    FROM
      CI_FT FT
      , CI_SA SA 
      , CI_ACCT_CHAR AC
      , CI_CUST_CL_L CL
      , CI_ACCT A
      , CI_ACCT_PER AP
          SELECT
            P.PER_ID
            , (P.CITY || ', ' || P.STATE || ',' || P.COUNTRY) ADDR
            , MAX(DECODE(PP.PHONE_TYPE_CD, 'MOB         ', PP.PHONE)) MOB
            , MAX(DECODE(PP.PHONE_TYPE_CD, 'BUSN        ', PP.PHONE)) BUS
            , MAX(DECODE(PP.PHONE_TYPE_CD, 'HOME        ', PP.PHONE)) HOME
            , MAX(DECODE(PP.PHONE_TYPE_CD, 'FAX         ', PP.PHONE)) FAX
            , MAX(DECODE(PN.NAME_TYPE_FLG, 'PRIM', PN.ENTITY_NAME)) ENG_NAME
            , MAX(DECODE(PN.NAME_TYPE_FLG, 'ALT ', PN.ENTITY_NAME)) ARA_NAME
            , MAX(DECODE(PC.CHAR_TYPE_CD, 'NATION  ', PC.CHAR_VAL)) NATION
          FROM
            CI_PER P
            , CI_PER_PHONE PP
            , CI_PER_NAME PN
            , CI_PER_CHAR PC
          WHERE
            P.PER_ID = PP.PER_ID (+)
          AND P.PER_ID = PN.PER_ID (+)
          AND P.PER_ID = PC.PER_ID (+)
          GROUP BY
            P.PER_ID
            , (P.CITY || ', ' || P.STATE || ',' || P.COUNTRY)
        ) P
    WHERE
      P.PER_ID = AP.PER_ID
    AND AP.ACCT_ID = AC.ACCT_ID
    AND AP.ACCT_ID = SA.ACCT_ID
    AND AP.MAIN_CUST_SW = 'Y'
    AND A.ACCT_ID = SA.ACCT_ID
    AND A.ACCT_ID = AP.ACCT_ID
    AND AC.CHAR_TYPE_CD = 'ACCTYPE' 
    AND AC.CHAR_VAL IN ('UOS', 'DEFAULT') 
    AND AC.ACCT_ID = SA.ACCT_ID
    AND CL.LANGUAGE_CD = 'ENG'
    AND A.ACCT_ID = AC.ACCT_ID
    AND A.CUST_CL_CD = CL.CUST_CL_CD
    AND SA.SA_ID = FT.SA_ID
    AND FT.FREEZE_DTTM IS NOT NULL 
    GROUP BY
      P.PER_ID
      , CL.DESCR
      , P.ENG_NAME
      , P.ARA_NAME
      , P.NATION
      , P.ADDR
      , ('Mob:' || NVL(P.MOB, '') || ', Home:' || NVL(P.HOME, '') || ', Bus.:' || NVL(P.BUS, '') || ', Fax:' || NVL(P.FAX, ''))
    HAVING
      SUM(FT.CUR_AMT) > 0
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.64       0.64          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch      304    353.09     430.04      21720   52997832          0        4543
    total      306    353.73     430.69      21720   52997832          0        4543
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 79  (CISADM)
    Rows     Row Source Operation
       4543  FILTER  (cr=52997832 pr=21720 pw=10311 time=430019418 us)
       5412   HASH GROUP BY (cr=52997832 pr=21720 pw=10311 time=430015729 us)
    199471    VIEW  (cr=52997832 pr=21720 pw=10311 time=423392346 us)
    199471     HASH GROUP BY (cr=52997832 pr=21720 pw=10311 time=423192867 us)
    4013304      TABLE ACCESS BY INDEX ROWID CI_FT (cr=52997832 pr=11409 pw=0 time=140469508 us)
    17717785       NESTED LOOPS  (cr=49295470 pr=8987 pw=0 time=407554071 us)
    13704480        NESTED LOOPS  (cr=21818135 pr=7655 pw=0 time=287797921 us)
    2782119         NESTED LOOPS OUTER (cr=3915432 pr=2950 pw=0 time=38953485 us)
    571492          NESTED LOOPS OUTER (cr=2545763 pr=2711 pw=0 time=7433194 us)
    286061           NESTED LOOPS OUTER (cr=2253263 pr=2671 pw=0 time=26607373 us)
    123411            NESTED LOOPS  (cr=1989056 pr=2642 pw=0 time=22711194 us)
    123411             NESTED LOOPS  (cr=1864959 pr=2642 pw=0 time=20860026 us)
    123411              NESTED LOOPS  (cr=1494040 pr=1754 pw=0 time=15553373 us)
    243088               NESTED LOOPS  (cr=29540 pr=1754 pw=0 time=10213331 us)
      13227                TABLE ACCESS FULL CI_PER (cr=251 pr=49 pw=0 time=43331 us)
    243088                INDEX RANGE SCAN XM150S1 (cr=29289 pr=1705 pw=0 time=6178159 us)(object id 97173)
    123411               INLIST ITERATOR  (cr=1464500 pr=0 pw=0 time=7220251 us)
    123411                INDEX RANGE SCAN CM064S0 (cr=1464500 pr=0 pw=0 time=5631936 us)(object id 108631)
    123411              TABLE ACCESS BY INDEX ROWID CI_ACCT (cr=370919 pr=888 pw=0 time=7241286 us)
    123411               INDEX UNIQUE SCAN XM148P0 (cr=247508 pr=0 pw=0 time=1198649 us)(object id 97147)
    123411             TABLE ACCESS BY INDEX ROWID CI_CUST_CL_L (cr=124097 pr=0 pw=0 time=1391837 us)
    123411              INDEX UNIQUE SCAN XC523P0 (cr=686 pr=0 pw=0 time=595005 us)(object id 97745)
    283749            TABLE ACCESS BY INDEX ROWID CI_PER_PHONE (cr=264207 pr=29 pw=0 time=3549713 us)
    283749             INDEX RANGE SCAN XM172P0 (cr=125886 pr=4 pw=0 time=1307395 us)(object id 98733)
    571492           INDEX RANGE SCAN XM171S2 (cr=292500 pr=40 pw=0 time=2976807 us)(object id 98728)
    2777066          TABLE ACCESS BY INDEX ROWID CI_PER_CHAR (cr=1369669 pr=239 pw=0 time=23084761 us)
    2777066           INDEX RANGE SCAN XM168P0 (cr=596156 pr=53 pw=0 time=7394319 us)(object id 98719)
    13704480         TABLE ACCESS BY INDEX ROWID CI_SA (cr=17902703 pr=4705 pw=0 time=163320548 us)
    13704480          INDEX RANGE SCAN XM199S1 (cr=5688247 pr=104 pw=0 time=51063061 us)(object id 98973)
    4013304        INDEX RANGE SCAN CM112S1 (cr=27477335 pr=1332 pw=0 time=124063022 us)(object id 116797)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                     304        0.00          0.00
      db file sequential read                     11366        0.34         65.63
      direct path write temp                       1473        0.06          2.91
      latch: cache buffers chains                    17        0.00          0.00
      db file scattered read                          7        0.01          0.03
      read by other session                           2        0.00          0.00
      direct path read temp                        1473        0.03          6.85
      SQL*Net message from client                   304        0.02          2.74
      SQL*Net more data to client                   292        0.00          0.00
    ********************************************************************************

    Luckys
    I've just realised that I mis-read part of your plan:
      199471     HASH GROUP BY (cr=52997832 pr=21720 pw=10311 time=423192867 us)
    4013304      TABLE ACCESS BY INDEX ROWID CI_FT (cr=52997832 pr=11409 pw=0 time=140469508 us)
    17717785       NESTED LOOPS  (cr=49295470 pr=8987 pw=0 time=407554071 us)The time component for a line is the time it supplies, plus the sum of the time from its direct descendents.
    In this case I looked at the HASH GROUP BY and TABLE ACCESS and got a difference of about 283 seconds. In fact I should have taken more notice of the other lines in the plan - comparing the HASH GROUP BY with the NESTED LOOP for a difference of about 16 seconds and assuming that the time in the TABLE ACCESS line was not to be trusted. (See http://jonathanlewis.wordpress.com/2007/04/26/heisenberg/ for a couple of comments on the timing issue).
    So the grouping is responsible for relatively little of the excess time - most of the time goes into the nested loop.
    I shall be using the Hints as advised, when we say we
    have to "rewrite the query"
    given the current context excluding the HINTS, what
    exactly should I be
    considering in terms of query rewrite, what
    additional intelligence I can add to the
    query in question so that CBO produces a different
    plan.
    The main consideration is what the query is supposed to report. Compare this with the way the optimizer is running the query and see if it makes sense.
    When are talking about high intermediate rows
    processing are we referring to this
    section of the plan?;
    4013304      TABLE ACCESS BY INDEX ROWID CI_FT
    (cr=52997832 pr=11409 pw=0 time=140469508 us)
    17717785       NESTED LOOPS  (cr=49295470 pr=8987
    pw=0 time=407554071 us)
    13704480        NESTED LOOPS  (cr=21818135 pr=7655
    pw=0 time=287797921 us)
    2782119         NESTED LOOPS OUTER (cr=3915432
    pr=2950 pw=0 time=38953485 us)
    2777066          TABLE ACCESS BY INDEX ROWID
    CI_PER_CHAR (cr=1369669 pr=239 pw=0 time=23084761
    us)
    2777066           INDEX RANGE SCAN XM168P0 (cr=596156
    pr=53 pw=0 time=7394319 us)(object id 98719)
    13704480         TABLE ACCESS BY INDEX ROWID CI_SA
    (cr=17902703 pr=4705 pw=0 time=163320548 us)
    13704480          INDEX RANGE SCAN XM199S1
    (cr=5688247 pr=104 pw=0 time=51063061 us)(object id
    98973)
    4013304        INDEX RANGE SCAN CM112S1 (cr=27477335
    pr=1332 pw=0 time=124063022 us)(object id 116797)
    Correct - one of the nested loops returns 2.78M rows - but as you run the next join you end up collecting 13.7M entires from the next index and table. That step is responsible for quite a lot of your work and time (as is the following step where you USE the 13.7M rows to probe the next index/table combination). If the optimizer had not grown the data set by merging the P view earlier on, the data sizes would be significantly smaller at that point.
    Your inline view looks as if it is trying to turn rows into columns (the max(decode()) trick) - which is why I think it might be a good idea to stop Oracle from merging the view. So, as I suggested, look at the query withouth that bit of complexity and work out a sensible way to walk through the tables - bearing in mind the statistics below and the available indexes, and the amount of data your predicates identify at each stage.
    Moreover tables have been analyzed:
    CI_ACCT                            243068
    CI_ACCT_CHAR                       222320
    CI_ACCT_PER                        242971
    CI_FT                              794510
    CI_PER                              13227
    CI_PER_CHAR                         42555
    CI_PER_PHONE                        18488
    CI_SA                             1082301
    Parameters:
    optimizer_features_enable string 10.2.0.2
    optimizer_index_caching integer 100
    optimizer_index_cost_adj integer 1
    Unless you've been given strict instructions by a 3rd-part supplier, those settings for the optimizer_index_caching and optimizer_index_cost_adj are particularly bad - especially in 10g. With those settings, the optimizer is quite likely to choose stupid plans with excessive use of indexes - and pick the wrong index while doing it.
    It's not appropriate to fiddle with system parameters to address one query - but at some stage you need to rethink your entire set of parameter settings to do things the 10g way. See this note from the Optimizer Group: http://www.oracle.com/technology/products/bi/db/10g/pdf/twp_bidw_optimizer_10gr2_0208.pdf
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "The greatest enemy of knowledge is not ignorance,
    it is the illusion of knowledge." Stephen Hawking.

  • Direct path read temp

    Hi All,
    DB version is 10.2.0.4
    An insert statement is running for almost 14 hours now. The wait event shows direct path read temp
      SID EVENT                           WAIT_TIME SECONDS_IN_WAIT         P1         P2
    1264 direct path read temp                  -1               0        524      64626Read about this event, which says it might happen due to Parallel full table scan not using the index. But that is not happening here..
    | Id  | Operation                                            | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT                                     |                                |     1 |   512 |   941   (1)| 00:00:12 |
    |   1 |  COUNT                                               |                                |       |       |            |          |
    |*  2 |   FILTER                                             |                                |       |       |            |          |
    |   3 |    NESTED LOOPS                                      |                                |     1 |   512 |   941   (1)| 00:00:12 |
    |   4 |     NESTED LOOPS                                     |                                |     1 |   506 |   940   (1)| 00:00:12 |
    |   5 |      NESTED LOOPS                                    |                                |     1 |   493 |   938   (1)| 00:00:12 |
    |   6 |       NESTED LOOPS                                   |                                |     1 |   478 |   937   (1)| 00:00:12 |
    |   7 |        NESTED LOOPS                                  |                                |     1 |   439 |   936   (1)| 00:00:12 |
    |   8 |         NESTED LOOPS                                 |                                |     1 |   420 |   934   (1)| 00:00:12 |
    |   9 |          NESTED LOOPS                                |                                |     1 |   382 |   932   (1)| 00:00:12 |
    |  10 |           NESTED LOOPS                               |                                |     1 |   377 |   931   (1)| 00:00:12 |
    |  11 |            NESTED LOOPS                              |                                |     1 |   295 |   929   (1)| 00:00:12 |
    |  12 |             NESTED LOOPS                             |                                |     1 |   280 |   927   (1)| 00:00:12 |
    |  13 |              NESTED LOOPS                            |                                |     1 |   273 |   927   (1)| 00:00:12 |
    |  14 |               NESTED LOOPS                           |                                |     1 |   247 |   925   (1)| 00:00:12 |
    |  15 |                NESTED LOOPS                          |                                |     1 |   239 |   924   (1)| 00:00:12 |
    |  16 |                 NESTED LOOPS                         |                                |     1 |   212 |   922   (1)| 00:00:12 |
    |  17 |                  NESTED LOOPS                        |                                |     1 |   205 |   921   (1)| 00:00:12 |
    |  18 |                   NESTED LOOPS                       |                                |     1 |   184 |   156   (1)| 00:00:02 |
    |  19 |                    NESTED LOOPS                      |                                |     1 |   109 |   154   (1)| 00:00:02 |
    |  20 |                     NESTED LOOPS                     |                                |     1 |    93 |   153   (1)| 00:00:02 |
    |* 21 |                      HASH JOIN                       |                                |     4 |   284 |   145   (1)| 00:00:02 |
    |* 22 |                       TABLE ACCESS BY INDEX ROWID    | GL_JE_LINES                    |    65 |  2730 |   130   (0)| 00:00:02 |
    |  23 |                        NESTED LOOPS                  |                                |    75 |  4500 |   140   (0)| 00:00:02 |
    |  24 |                         MERGE JOIN CARTESIAN         |                                |     1 |    18 |    10   (0)| 00:00:01 |
    |  25 |                          TABLE ACCESS FULL           | FND_PRODUCT_GROUPS             |     1 |     2 |     2   (0)| 00:00:01 |
    |  26 |                          BUFFER SORT                 |                                |     1 |    16 |     8   (0)| 00:00:01 |
    |* 27 |                           TABLE ACCESS BY INDEX ROWID| GL_CODE_COMBINATIONS           |     1 |    16 |     8   (0)| 00:00:01 |
    |* 28 |                            INDEX RANGE SCAN          | JSW_GL_CODE_COMB_SEG_IDX       |    10 |       |     2   (0)| 00:00:01 |
    |* 29 |                         INDEX RANGE SCAN             | GL_JE_LINES_N1                 |   933 |       |     6   (0)| 00:00:01 |
    |* 30 |                       TABLE ACCESS FULL              | GL_PERIODS                     |     5 |    55 |     4   (0)| 00:00:01 |
    |* 31 |                      TABLE ACCESS BY INDEX ROWID     | GL_JE_HEADERS                  |     1 |    22 |     2   (0)| 00:00:01 |
    |* 32 |                       INDEX UNIQUE SCAN              | GL_JE_HEADERS_U1               |     1 |       |     1   (0)| 00:00:01 |
    |  33 |                     TABLE ACCESS BY INDEX ROWID      | GL_CODE_COMBINATIONS           |     1 |    16 |     1   (0)| 00:00:01 |
    |* 34 |                      INDEX UNIQUE SCAN               | GL_CODE_COMBINATIONS_U1        |     1 |       |     0   (0)| 00:00:01 |
    |* 35 |                    TABLE ACCESS BY INDEX ROWID       | GL_JE_BATCHES                  |     1 |    75 |     2   (0)| 00:00:01 |
    |* 36 |                     INDEX UNIQUE SCAN                | GL_JE_BATCHES_U1               |     1 |       |     1   (0)| 00:00:01 |
    |* 37 |                   TABLE ACCESS BY INDEX ROWID        | MTL_TRANSACTION_ACCOUNTS       |     1 |    21 |   765   (0)| 00:00:10 |
    |* 38 |                    INDEX RANGE SCAN                  | MTL_TRANSACTION_ACCOUNTS_N3    |  4021 |       |    28   (0)| 00:00:01 |
    |* 39 |                  TABLE ACCESS BY INDEX ROWID         | HR_ALL_ORGANIZATION_UNITS      |     1 |     7 |     1   (0)| 00:00:01 |
    |* 40 |                   INDEX UNIQUE SCAN                  | HR_ORGANIZATION_UNITS_PK       |     1 |       |     0   (0)| 00:00:01 |
    |* 41 |                 TABLE ACCESS BY INDEX ROWID          | HR_ORGANIZATION_INFORMATION    |     1 |    27 |     2   (0)| 00:00:01 |
    |* 42 |                  INDEX RANGE SCAN                    | HR_ORGANIZATION_INFORMATIO_FK2 |     1 |       |     1   (0)| 00:00:01 |
    |  43 |                TABLE ACCESS BY INDEX ROWID           | MTL_PARAMETERS                 |     1 |     8 |     1   (0)| 00:00:01 |
    |* 44 |                 INDEX UNIQUE SCAN                    | MTL_PARAMETERS_U1              |     1 |       |     0   (0)| 00:00:01 |
    |* 45 |               TABLE ACCESS BY INDEX ROWID            | HR_ORGANIZATION_INFORMATION    |     1 |    26 |     2   (0)| 00:00:01 |
    |* 46 |                INDEX RANGE SCAN                      | HR_ORGANIZATION_INFORMATIO_FK2 |     1 |       |     1   (0)| 00:00:01 |
    |* 47 |              INDEX UNIQUE SCAN                       | HR_ALL_ORGANIZATION_UNTS_TL_PK |     1 |     7 |     0   (0)| 00:00:01 |
    |* 48 |             TABLE ACCESS BY INDEX ROWID              | MTL_MATERIAL_TRANSACTIONS      |     1 |    15 |     2   (0)| 00:00:01 |
    |* 49 |              INDEX UNIQUE SCAN                       | MTL_MATERIAL_TRANSACTIONS_U1   |     1 |       |     1   (0)| 00:00:01 |
    |  50 |            TABLE ACCESS BY INDEX ROWID               | MTL_SYSTEM_ITEMS_B             |     1 |    82 |     2   (0)| 00:00:01 |
    |* 51 |             INDEX UNIQUE SCAN                        | MTL_SYSTEM_ITEMS_B_U1          |     1 |       |     1   (0)| 00:00:01 |
    |* 52 |           INDEX FULL SCAN                            | GL_SETS_OF_BOOKS_U2            |     1 |     5 |     1   (0)| 00:00:01 |
    |* 53 |          TABLE ACCESS BY INDEX ROWID                 | RCV_TRANSACTIONS               |     1 |    38 |     2   (0)| 00:00:01 |
    |* 54 |           INDEX UNIQUE SCAN                          | RCV_TRANSACTIONS_U1            |     1 |       |     1   (0)| 00:00:01 |
    |* 55 |         TABLE ACCESS BY INDEX ROWID                  | PO_HEADERS_ALL                 |     1 |    19 |     2   (0)| 00:00:01 |
    |* 56 |          INDEX UNIQUE SCAN                           | PO_HEADERS_U1                  |     1 |       |     1   (0)| 00:00:01 |
    |  57 |        TABLE ACCESS BY INDEX ROWID                   | PO_VENDORS                     |     1 |    39 |     1   (0)| 00:00:01 |
    |* 58 |         INDEX UNIQUE SCAN                            | PO_VENDORS_U1                  |     1 |       |     0   (0)| 00:00:01 |
    |  59 |       TABLE ACCESS BY INDEX ROWID                    | PO_VENDOR_SITES_ALL            |     1 |    15 |     1   (0)| 00:00:01 |
    |* 60 |        INDEX UNIQUE SCAN                             | PO_VENDOR_SITES_U1             |     1 |       |     0   (0)| 00:00:01 |
    |  61 |      TABLE ACCESS BY INDEX ROWID                     | RCV_SHIPMENT_HEADERS           |     1 |    13 |     2   (0)| 00:00:01 |
    |* 62 |       INDEX UNIQUE SCAN                              | RCV_SHIPMENT_HEADERS_U1        |     1 |       |     1   (0)| 00:00:01 |
    |* 63 |     INDEX UNIQUE SCAN                                | RCV_SHIPMENT_LINES_U1          |     1 |     6 |     1   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------------------------------The PGA size is 5gb. What is the cause of this wait event?
    baskar.l

    Hi,
    How do i resolve this..?
    Read from the document Optimizer Selects the Merge Join Cartesian Despite the Hints (Doc ID 457058.1)
    |  24 |                         MERGE JOIN CARTESIAN         |                                |     1 |    18 |    10   (0)| 00:00:01 |
    |  25 |                          TABLE ACCESS FULL           | FND_PRODUCT_GROUPS             |     1 |     2 |     2   (0)| 00:00:01 |
    |  26 |                          BUFFER SORT                 |                                |     1 |    16 |     8   (0)| 00:00:01 |
    |* 27 |                           TABLE ACCESS BY INDEX ROWID| GL_CODE_COMBINATIONS           |     1 |    16 |     8   (0)| 00:00:01 |
    |* 28 |                            INDEX RANGE SCAN          | JSW_GL_CODE_COMB_SEG_IDX       |    10 |       |     2   (0)| 00:00:01 |Have set
    SQL> alter session set "_optimizer_mjc_enabled"=false ;
    |* 21 |                      HASH JOIN                      |                                |     4 |   284 |   139   (1)| 00:00:02 |
    |* 22 |                       TABLE ACCESS BY INDEX ROWID   | GL_JE_LINES                    |    65 |  2730 |   124   (0)| 00:00:02 |
    |  23 |                        NESTED LOOPS                 |                                |    75 |  4500 |   134   (0)| 00:00:02 |
    |  24 |                         NESTED LOOPS                |                                |     1 |    18 |    10   (0)| 00:00:01 |
    |  25 |                          TABLE ACCESS FULL          | FND_PRODUCT_GROUPS             |     1 |     2 |     2   (0)| 00:00:01 |
    |* 26 |                          TABLE ACCESS BY INDEX ROWID| GL_CODE_COMBINATIONS           |     1 |    16 |     8   (0)| 00:00:01 |
    |* 27 |                           INDEX RANGE SCAN          | JSW_GL_CODE_COMB_SEG_IDX       |    10 |       |     2   (0)| 00:00:01 |thanks,
    baskar.l

  • Direct Path Reads instead of Sequential Reads for index range scan

    Database is 11.2. I have two development schemas, with the same table loaded in each schema - a 5 million row table. The execution path for the sql statement is the same against both tables; it's doing an index range scan.
    But it would appear Oracle performs a direct path read against one schema, and performs sequential reads against the other schema. I don't understand why I'm seeing different behavior when the execution plan is the same. Any ideas? These are two different schemas in the same database.

    There is not enough information.So you even these tables located same database and you gathered statistics it is not mean both run time wait event statistics must be same.Really they are different tables.If both query use INDEX RANGE SCAN the it is not mean these plans are same.What about table and their index statistics? are they same? for example num_row or num_blocks of both tables are same? also about indexes.In additionally if you want to get exact reason you can enable sql trace(using dbms_monitor or setting sql_trace parameter to true according session) and need analyze result trace file using tkprof utility.In additionally in 11g here when query execution time oracle automatically choose direct read path(serial) based on size of tables and size of buffer cache(also here is available some hidden parameter to controlling this behavior).

  • Direct path read/write temp

    Hi!
    We are getting an high number of wait events:
    - direct path read temp
    - direct path write temp
    What could be the problem and what actions to debug this situation?
    Thanks a lot
    A.

    While i execute the above query, it shows the output like
    OBJECT_NAME OBJECT_TYPE EVENT P1 P2 P3 TTL_WAIT_TIME
    FIN2010 TABLE direct path read 35 549636 124 .2
    FIN2010 TABLE direct path read 35 415236 124 .15
    FIN2010 TABLE direct path read 35 703616 128 .08
    FIN2010 TABLE direct path read 35 487569 111 .07
    FIN2010 TABLE direct path read 35 472960 128 .07
    FIN2010 TABLE direct path read 35 125696 128 .07
    FIN2010 TABLE direct path read 35 303618 126 .06
    FIN2010 TABLE direct path read 35 146560 128 .06
    FIN2010 TABLE direct path read 35 373376 128 .06
    FIN2010 TABLE direct path read 35 523776 128 .06
    FIN2010 TABLE direct path read 35 467584 128 .06
    FIN2010 TABLE direct path read 35 456068 124 .06
    FIN2010 TABLE direct path read 35 434304 128 .05
    FIN2010 TABLE direct path read 35 443648 128 .05
    FIN2010 TABLE direct path read 35 467840 128 .04
    FIN2010 TABLE direct path read 35 752640 128 .04
    FIN2010 TABLE direct path read 35 266240 128 .04
    FIN2010 TABLE direct path read 35 525696 128 .04
    FIN2010 TABLE direct path read 35 499200 128 .04
    FIN2010 TABLE direct path read 35 854656 128 .04
    FIN2010 TABLE direct path read 35 439552 128 .04
    FIN2010 TABLE direct path read 35 514048 128 .04
    FIN2010 TABLE direct path read 35 750279 57 .04
    FIN2010 TABLE direct path read 35 434816 128 .04
    FIN2010 TABLE direct path read 35 418308 124 .04
    FIN2010 TABLE direct path read 35 534912 128 .04
    FIN2010 TABLE direct path read 35 401057 95 .03
    FIN2010 TABLE direct path read 35 476800 128 .03
    FIN2010 TABLE direct path read 35 188928 128 .03
    FIN2010 TABLE direct path read 35 865920 128 .03
    FIN2010 TABLE direct path read 35 103812 124 .03
    FIN2010 TABLE direct path read 35 307586 126 .03
    FIN2010 TABLE direct path read 35 539520 79 .03
    FIN2010 TABLE direct path read 35 333696 128 .03
    FIN_TEST TABLE direct path read 35 272944 8 .03
    FIN2010 TABLE direct path read 35 644608 128 .03
    FIN2010 TABLE direct path read 35 833152 128 .03
    FIN2010 TABLE direct path read 35 709248 128 .03
    FIN2010 TABLE direct path read 35 507904 128 .02
    FIN2010 TABLE direct path read 35 540928 128 .02
    FINTABLE TABLE direct path read 35 569216 128 .02
    FIN2010 TABLE direct path read 35 311810 126 .02
    FIN2010 TABLE direct path read 35 441600 110 .02
    FIN2010 TABLE direct path read 35 555780 124 .02
    FIN2010 TABLE direct path read 35 144384 128 .02
    FIN2010 TABLE direct path read 35 384000 128 .02
    FIN2010 TABLE direct path read 35 720000 128 .02
    FIN2010 TABLE direct path read 35 133376 128 .02
    FIN2010 TABLE direct path read 35 135680 128 .02
    FIN2010 TABLE direct path read 35 553732 124 .02
    FIN2010 TABLE direct path read 35 840960 128 .02
    FIN2010 TABLE direct path read 35 547072 128 .02
    FIN2010 TABLE direct path read 35 756864 128 .01
    FIN2010 TABLE direct path read 35 165888 128 .01
    FIN2010 TABLE direct path read 35 885120 128 .01
    FIN2010 TABLE direct path read 35 538880 128 .01
    FIN2010 TABLE direct path read 35 646656 128 .01
    FIN2010 TABLE direct path read 35 377856 128 .01
    FIN2010 TABLE direct path read 35 336384 128 .01
    FIN2010 TABLE direct path read 35 380032 128 .01
    FIN2010 TABLE direct path read 35 573440 128 .01
    FIN2010 TABLE direct path read 35 660352 128 .01
    FIN2010 TABLE direct path read 35 482688 128 .01
    FIN2010 TABLE direct path read 35 553088 128 .01
    FIN2010 TABLE direct path read 35 545408 128 .01
    FIN2010 TABLE direct path read 35 145152 128 0
    FIN2010 TABLE direct path read 35 886272 128 0
    FIN2010 TABLE direct path read 35 695424 128 0
    FIN2010 TABLE direct path read 35 671488 128 0
    FIN2010 TABLE direct path read 35 393344 128 0
    FIN2010 TABLE direct path read 35 756096 128 0
    FIN2010 TABLE direct path read 35 681344 128 0
    FIN2010 TABLE direct path read 35 657536 128 0
    FIN2010 TABLE direct path read 35 151296 128 0
    FIN2010 TABLE direct path read 35 112000 128 0
    FIN2010 TABLE direct path read 35 637184 128 0
    FIN2010 TABLE direct path read 35 146304 128 0
    FIN2010 TABLE direct path read 35 105344 128 0
    FIN2010 TABLE direct path read 35 358148 124 0
    FIN2010 TABLE direct path read 35 137856 128 0
    FIN2010 TABLE direct path read 35 713984 128 0
    FIN2010 TABLE direct path read 35 704896 128 0
    FIN2010 TABLE direct path read 35 687616 128 0
    FIN2010 TABLE direct path read 35 702720 128 0
    FIN2010 TABLE direct path read 35 673664 128 0
    FIN2010 TABLE direct path read 35 142592 128 0
    FIN2010 TABLE direct path read 35 394496 128 0
    FIN2010 TABLE direct path read 35 403072 128 0
    FIN2010 TABLE direct path read 35 639616 128 0
    FIN2010 TABLE direct path read 35 710656 128 0
    FIN2010 TABLE direct path read 35 131328 128 0
    FIN2010 TABLE direct path read 35 161156 124 0
    FIN2010 TABLE direct path read 35 107520 128 0
    FIN2010 TABLE direct path read 35 157824 128 0
    FIN2010 TABLE direct path read 35 98502 58 0
    FIN2010 TABLE direct path read 35 695936 128 0
    FIN2010 TABLE direct path read 35 709632 128 0
    FIN2010 TABLE direct path read 35 689536 128 0
    FIN2010 TABLE direct path read 35 126218 118 0
    FIN2010 TABLE direct path read 35 647680 128 0
    FIN2010 TABLE direct path read 35 842240 119 0
    FIN2010 TABLE direct path read 35 497536 128 0
    FIN2010 TABLE direct path read 35 264960 128 0
    FIN2010 TABLE direct path read 35 704256 128 0
    FIN2010 TABLE direct path read 35 714240 128 0
    FIN2010 TABLE direct path read 35 641920 128 0
    FIN2010 TABLE direct path read 35 837376 128 0
    FIN2010 TABLE direct path read 35 646528 128 0
    FIN2010 TABLE direct path read 35 700672 128 0
    FIN2010 TABLE direct path read 35 642432 128 0
    =======================================================================
    While i check my awr report, it take large time for direct path write temp.
    Anybody help me to find the root cause and how to tune the database.
    Please help me..
    While

  • HT203164 I have purchased several books on tape via my computer and now want to sync them to my ipod....I can't find the appropriate buttons to do that.  Also though I have receipts for books purchased they are not showing up on my Itune purchased list. 

    I have purcase several audio books via Itunes and they are on my computer however I have been unable to figure out how to transfer (sync??) them to my Ipod.  Also I have receipts for several Itune audio books but they are not showing up on my purchased list. Help!!!

    lizdance40, audio books are NOT available for redownload. Books with words areavailable for redownload.
    See:
    http://www.tuaw.com/2013/04/03/audiobooks-are-not-backed-up-by-icloud-can-only-b e-downloaded-o/
    In the future please do not post incorrect information
    lizdance40 wrote:
    If iTunes still carries the books, they ARE available to download from the cloud, either to the computer or your iPod Touch directly.
    Open iBooks on the device and tap on 'purchased'. 
    download.
    iTunes does not garentee to carry a book forever, a serious flaw.  If you can't find the book in iTunes anymore and didn't keep it on the computer, or backed up, it may be gone.
    To add audio books to the iPod;
    you have to check the box at the bottom section of the Books screen that says, "sync audio books"

Maybe you are looking for

  • Using ranking and sum to get top 5 products' share of total market

    Hi everybody, I have been playing around with ranking for a while now and I am stuck.. I have a crosstab where I want to show the top 5 products in a specific month. So I have month in my column and products in my rows. I applied a ranking based on r

  • [SOLVED] Yaourt: not found on AUR

    When I try to run yaourt -Syu --aur I am told that yaourt: not found on AUR This is given for all packages I've installed from the AUR. I am behind a http proxy, but have exported this variable in my shell. And I know that at least some of these pack

  • Count of Column  based on Value

    Hi All In our database table we have 3 columns closedate,empcode,status. I am using the following query to fetch the data required : select closedate,count(empcode) COUNT,EMPCODE,status from dbcleaning WHERE STATUS='Fixed' and EMPCODE='E315' group by

  • Extending DVI cable length for 30" display

    With my new home office setup the computer will sit 25ft from the 30" Cinema display, so what are my options connecting this beast? + DVI Coupler (Female to Female) and DVI Male Digital/DVI Male Digital Dual Link (24AWG) Cable - 25FT Would that work?

  • Why to use AW

    I was wondering who uses AW when most of the times with attachments is always requested a Word document and doesn't work if I use AW. Can anyone explain when to use AW and if Apple will introduce a version which can be accepted by most of websites ?