Slow, then fast execution of same query

I have a test query:
dbxml> query 'count(collection()/Quots/QuotVerificationInstance/@lastModifiedDate[.="2009-09-07"])'
With this index:
Index: node-attribute-substring-string for node {}:lastModifiedDate
The first time I run the query in the shell, it takes a while:
Query - Finished query execution, time taken = 29656ms
The second time I run the query, it's a more acceptable speed:
Query - Finished query execution, time taken = 735ms
Can anyone explain the difference in search speed? The slow, fast pattern is pretty consistent (I've tried fresh shell sessions a few times and get the same initial slow search followed by the quicker one.)
What I'm trying to do is allow on-demand generation of a table showing the number of records modified per day and per month. The test date I'm searching for above is the date of insertion of records so it returns a comparatively large result set at the moment, but 29-odd seconds is way too slow to make the query comfortable. I've added a substring index because sometimes I want a partial date search (e.g. when counting records modified per month). I remember reading that a substring index doubles as an equality index. The date is stored simply as a string, not a date type.
What am I missing? I'd like to understand the difference in execution times, but basically I need it to run more quickly for simultaneous date queries. I'd be grateful for any pointers.
Tim

Hi Viyacheslav
I think it's perhaps too much trouble for us both for me to try and share the container -- my managers would want assurances about copyright (the data is part of a previously published dictionary), and I'd have to build a smaller one as the current file is > 500MB. But thanks for your interest.
My container setup is pretty simple. It's around 45000 small XML files added to a node container for a read only database (no environment). I have 16 indices supporting a range of different searches and a couple of reports, and the only index relevant to the @lastModifiedDate search is the node-attribute-substring-string index mentioned above (when I tried other edge or equality indexes I deleted the substring index). The query script I intended would be instantiated purely to run the one query and then die each time, so I don't see there being any chance of getting past an initial slow query if that's the behaviour. Because that first query finds around 37000 matches among the 45000 dates, it's understandable that it would take a while but I'm not sure why it speeds up in the shell from the second time round. An obvious suggestion would be that some form of optimisation is taking place in the shell, but I don't understand the workings of DBXML well enough to guess how. Even if this is the case, knowing that it happens wouldn't help me speed up my query due to the life cycle of the script.
Perhaps I should just generate these stats on a daily basis rather than generating them on-demand, or else try a different approach at getting the counts. But thanks again for the comments.
Tim

Similar Messages

  • Oracle/VB program runs slow then fast

    We have a version 13 application (running now with lots of data)that we want to upgrade to version 17. Both are Visual Basic/Oracle aps.
    Because the layout is different between the two database's we wrote a long script to pour into the version 17 structure the version 13 data. We have to turn off all constraints.
    Version 17 runs but reports run very very slow.
    Just by chance we did a backup "dump" of the version 17 database. Then we just happend to take this dump to another machine, imported the data and ran version 17. It runs fast again.
    What gives? Any ideas
    my e-mail [email protected]

    Sounds like the first machine has a bad environment (are the two machines running on the same type/speed of processors ?). Re-installing the software might help in this matter.
    Sorry I can't be more specific !

  • Lightrrom 2.1 slow - then fast - what the?

    LR 2.1 driving me crazy - grads so slow So searched online and saw mixed response to 2.1 in regard the grad and brush tools.
    Shortly after lr crashes. When I come back to it, the grads are MUCH faster. Previously about half a second (to update position, rotation, sliders) = virtually unusable. Now about tenth of a second between refreshes = usable. Refresh of everything has improved (although the eg exposure slider is still slow to refresh - about fith of a second).
    Is this a memory issue? (I have 4gb RAM) It feels like trying to use photoshop on a 486!

    Hi Viyacheslav
    I think it's perhaps too much trouble for us both for me to try and share the container -- my managers would want assurances about copyright (the data is part of a previously published dictionary), and I'd have to build a smaller one as the current file is > 500MB. But thanks for your interest.
    My container setup is pretty simple. It's around 45000 small XML files added to a node container for a read only database (no environment). I have 16 indices supporting a range of different searches and a couple of reports, and the only index relevant to the @lastModifiedDate search is the node-attribute-substring-string index mentioned above (when I tried other edge or equality indexes I deleted the substring index). The query script I intended would be instantiated purely to run the one query and then die each time, so I don't see there being any chance of getting past an initial slow query if that's the behaviour. Because that first query finds around 37000 matches among the 45000 dates, it's understandable that it would take a while but I'm not sure why it speeds up in the shell from the second time round. An obvious suggestion would be that some form of optimisation is taking place in the shell, but I don't understand the workings of DBXML well enough to guess how. Even if this is the case, knowing that it happens wouldn't help me speed up my query due to the life cycle of the script.
    Perhaps I should just generate these stats on a daily basis rather than generating them on-demand, or else try a different approach at getting the counts. But thanks again for the comments.
    Tim

  • Dicoverer Viewer is Slow Compared to DiscovererPlus for same query...why ??

    Hi,
    I have a report whcih runs from a custom table which gets populated daily in the night.
    It retrieves aroun 98000 records widout parameters.
    The report runs in around 4-5 seconds in Discoverer Plus wheras in
    Discoverer Viewer it is taking almost 45-50 seconds...Could anyone please advice as to what could be
    the reason and can we do some thing to make the Viewer equally fast as Viewer is the Discoverer Tool
    we are giving the users access to and with this speed it would not be acceptable.
    Plz Advice ASAP.
    Thanks,
    VJ

    Hello Raptole,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    OS X Mountain Lion: If your Mac runs slowly
    http://support.apple.com/kb/PH10798
    Mac OS X: Setting up Login, Startup items
    http://support.apple.com/kb/ht2602
    Log in as the user who wishes to have a login item or as an admin user.
    Choose System Preferences from the Apple menu.
    Choose Accounts from the View menu.
    Click the name of the user.
    Mac OS X 10.4 or later: Click the Login Items button.
    select things you dont need and Click the "minus" button.
    Best of luck,
    Mario

  • Browser response time slow but Analyzer fast with same query

    Hi all,
    We have a very complex query (structures and cell formulas).  When I drill and filter on a specific characteristic the action takes anything between 7 and 15 minutes when using the browser. The same query in Analyzer performing the same drilling action takes less than 35 seconds.
    Our architecture is as follows:
    - Relevant cubes are indexed on BWA
    - WebDynPro for Java
    We can see that the BWA is hit for a short time then the CPU utilization is back to 0%.  When doing '&profiling=x' on the browser I can see that the most of the time is spent on 'Get result set' / 'Get provider result set' for the Java events and on the OLAP side most time is spent on the 'Get result set' event.
    Interestingly enough - when disabling myself as a user for BIA use (NO_BIA_USE) in my user profile I get the same response time on the browser.
    So, does anyone have an idea of what may be the cause of the slow response time when using the browser?
    Thanks
    Edited by: Cobus van Rooyen on May 10, 2010 8:49 PM

    Hi,
    The reason is most likely because of the event ID 3200 where data transfer takes place from OLAP to frontend browser.
    Record a RSTT trace for this and if you are able to see frequent calls to "Apply State XML" and "Get Result Set" then apply the SAP Note 1428850. Otherwise see which function module is causing an error.
    If trace runtime is less but in browser still it takes long time then this might be because of the compression of HTPP responses, which can be confirmed by observing the sent and received data volumns from the HTTP server requests/responses. For more information refer SAP Note 746666.
    Imran...

  • Ref cursor is slower than issuing the same query directly

    We are building SQL dynamically in PL/SQL procedure. SQL is complex enough (pivoting, UNIONS, spatial operations, complex underlying view joining many tables). Then we are opening ref cursor output parameter using the following syntax:
    OPEN p_cursor FOR v_sql using p_param1, p_param2;
    Then client code iterates through the rows of the cursor. It takes about a minute. If we run the SQL stored in v_sql variable directly in SQL Plus (replacing bind variables with values of course), we get 4 seconds response time.
    QUESTION: what makes ref cursor being so slow comparing with direct execution of the same query?

    OK, here are the traces. Execution plans look different. I have called SP (which opens ref cursor) first, then applied tkprof on trace file, copied SQL from that file into SQL Plus (before that I have defined bind variables in SQL Plus) and executed it, so I'm 100% sure that in SQL Plus I'm running exactly the same query SP issues for ref cursor.
    1. PL/SQL - ref cursor:
    TKPROF: Release 10.2.0.1.0 - Production on Wed May 16 10:59:30 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Trace file: D:\oracle\product\10.2.0\admin\dae\udump\dae_ora_17004_refcursor.trc
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 569 0.12 0.09 0 1707 0 569
    Fetch 0 0.00 0.00 0 0 0 0
    total 571 0.12 0.09 0 1707 0 569
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 75
    declare
    TYPE OutRefCursor IS REF CURSOR;
    TYPE RightClickRec IS RECORD(category_ varchar2(50), subcategory varchar2(50), param_name varchar2(50), param_value varchar2(50));
    rc OutRefCursor;
    rec RightClickRec;
    errno number;
    errmsg varchar2(200);
    begin
    cust_pck_layer.get_right_click_channel_info('7WAN097B_B','TCH',rc, errno, errmsg);
    loop
    fetch rc into rec;
    exit when rc%notfound;
    dbms_output.put_line(rec.category_ || ' ' || rec.subcategory || ' ' || rec.param_name || ' ' || rec.param_value);
    end loop;
    end;
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.15 0.15 0 0 0 1
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.15 0.15 0 0 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 75
    select Category, Sub_Category, Param_Name, Param_Value
    from
    ( ( select distinct 0 as order_c,'TCH Analysis' as Category, NULL as
    Sub_Category,0 as Param_Id, 'Analyzed Sector' as Param_Name, :p_sectorid_1
    as Param_Value, 0 as SORTORDER, 0 as DISTANCE from dual)
    UNION select
    order_c,Category,Sub_Category,Param_Id,Param_Name,stragg(Param_Value) as
    Param_Value,1 as SORTORDER, 0 as DISTANCE from ( select distinct 1 as
    order_c,'TCH Analysis' as Category, NULL as Sub_Category,0 as Param_Id,
    'TCH' as Param_Name, to_char(CHANNEL) as Param_Value, 1 as SORTORDER, 0 as
    DISTANCE from sector_freq_params where SECTOR_ID=:p_SectorId_2 and
    CHAN_TYPE_ID = 2) group by order_c,Category,Sub_Category,Param_Id,
    Param_Name,SORTORDER
    UNION (select r.rr + 1 order_c, 'TCH Analysis' as
    Category, to_char(Sub_Category) as Sub_Category,
    decode(r.rr, 1, 1, 2, 3, 3,
    3, 4, 4, 5, 4) Param_Id,
    decode(r.rr, 1, 'Sector Name', 2, 'Channel
    Number', 3, 'BSIC', 4, 'Relationship', 5, 'Distance to Sector (mi)')
    Param_Name,
    decode(r.rr, 1, SECTOR_ID, 2, Channel_Number, 3, BSIC, 4,
    Relationship, 5, Distance) Param_Value, SORTORDER, DISTANCE from
    (select
    rownum Sub_Category, SECTOR_ID, SORTORDER, Channel_Number, BSIC,
    Relationship, DISTANCE
    from dae_admin.TCH_ANALYSIS_VIEW where
    SELECTED_SECTOR_ID = :p_sectorid_3 and
    SDO_WITHIN_DISTANCE(GEOLOC,
    SELECTED_GEOLOC, 'unit=MILE,distance=25')='TRUE') qry,
    (select 1 rr from
    dual union select 2 from dual union select 3 from dual union select 4 from
    dual union select 5 from dual) r)) order by SORTORDER, DISTANCE, order_c
    asc
    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 8513 31.56 33.05 0 1006398 0 8512
    total 8515 31.56 33.05 0 1006398 0 8512
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 75 (recursive depth: 1)
    Rows Row Source Operation
    8512 SORT ORDER BY (cr=1972854 pr=0 pw=0 time=62811214 us)
    8512 VIEW (cr=1972854 pr=0 pw=0 time=62806007 us)
    8512 SORT UNIQUE (cr=1972854 pr=0 pw=0 time=62797492 us)
    8512 UNION-ALL (cr=1972854 pr=0 pw=0 time=2119247 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=1 us)
    1 SORT GROUP BY (cr=2457 pr=0 pw=0 time=16606 us)
    3 VIEW (cr=2457 pr=0 pw=0 time=16040 us)
    3 HASH UNIQUE (cr=2457 pr=0 pw=0 time=16036 us)
    3 PARTITION RANGE ALL PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3999 us)
    3 TABLE ACCESS FULL SECTOR_FREQ_PARAMS PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3996 us)
    8510 MERGE JOIN CARTESIAN (cr=1970397 pr=0 pw=0 time=62768739 us)
    5 VIEW (cr=0 pr=0 pw=0 time=54 us)
    5 SORT UNIQUE (cr=0 pr=0 pw=0 time=49 us)
    5 UNION-ALL (cr=0 pr=0 pw=0 time=21 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=2 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=0 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=2 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=1 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=2 us)
    8510 BUFFER SORT (cr=1970397 pr=0 pw=0 time=62760191 us)
    1702 VIEW (cr=1970397 pr=0 pw=0 time=20797110 us)
    1702 COUNT (cr=1970397 pr=0 pw=0 time=20793704 us)
    1702 VIEW TCH_ANALYSIS_VIEW (cr=1970397 pr=0 pw=0 time=20792001 us)
    15588 HASH JOIN (cr=10465 pr=0 pw=0 time=2560803 us)
    15609 MERGE JOIN (cr=4918 pr=0 pw=0 time=1430639 us)
    478112 MERGE JOIN CARTESIAN (cr=2461 pr=0 pw=0 time=659598 us)
    1 PARTITION RANGE ALL PARTITION: 1 2 (cr=4 pr=0 pw=0 time=79 us)
    1 TABLE ACCESS BY LOCAL INDEX ROWID SECTORS PARTITION: 1 2 (cr=4 pr=0 pw=0 time=68 us)
    1 INDEX RANGE SCAN SECTORS_SECTORID_IND PARTITION: 1 2 (cr=3 pr=0 pw=0 time=25 us)(object id 1834180)
    478112 BUFFER SORT (cr=2457 pr=0 pw=0 time=181427 us)
    478112 PARTITION RANGE ALL PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=478158 us)
    478112 TABLE ACCESS FULL SECTOR_FREQ_PARAMS PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=45 us)
    15609 FILTER (cr=2457 pr=0 pw=0 time=1859879 us)
    1434336 SORT JOIN (cr=2457 pr=0 pw=0 time=513880 us)
    3 PARTITION RANGE ALL PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3966 us)
    3 TABLE ACCESS FULL SECTOR_FREQ_PARAMS PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3958 us)
    115509 PARTITION RANGE ALL PARTITION: 1 2 (cr=5547 pr=0 pw=0 time=115594 us)
    115509 TABLE ACCESS FULL SECTORS PARTITION: 1 2 (cr=5547 pr=0 pw=0 time=115586 us)
    select count(*)
    from
    mdsys.geodetic_srids where srid = 99900001
    call count cpu elapsed disk query current rows
    Parse 62352 0.53 0.47 0 0 0 0
    Execute 62353 0.78 0.76 0 0 0 0
    Fetch 62352 0.65 0.65 0 187056 0 62352
    total 187057 1.96 1.90 0 187056 0 62352
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 2)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=3 pr=0 pw=0 time=39 us)
    0 TABLE ACCESS BY INDEX ROWID SDO_CS_SRS (cr=3 pr=0 pw=0 time=24 us)
    1 INDEX UNIQUE SCAN SYS_C003941 (cr=2 pr=0 pw=0 time=14 us)(object id 48833)
    select wktext, srid
    from
    mdsys.cs_srs where srid = 99900001
    call count cpu elapsed disk query current rows
    Parse 31176 0.20 0.20 0 0 0 0
    Execute 31176 0.18 0.26 0 0 0 0
    Fetch 31176 0.20 0.23 0 93528 0 31176
    total 93528 0.59 0.71 0 93528 0 31176
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 2)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID SDO_CS_SRS (cr=3 pr=0 pw=0 time=9 us)
    1 INDEX UNIQUE SCAN SYS_C003941 (cr=2 pr=0 pw=0 time=6 us)(object id 48833)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 3 0.00 0.00 0 0 0 0
    Execute 570 0.28 0.25 0 1707 0 570
    Fetch 0 0.00 0.00 0 0 0 0
    total 573 0.28 0.25 0 1707 0 570
    Misses in library cache during parse: 0
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 93529 0.73 0.68 0 0 0 0
    Execute 93530 0.96 1.03 0 0 0 0
    Fetch 102041 32.42 33.94 0 1286982 0 102040
    total 289100 34.12 35.66 0 1286982 0 102040
    Misses in library cache during parse: 0
    93532 user SQL statements in session.
    0 internal SQL statements in session.
    93532 SQL statements in session.
    Trace file: D:\oracle\product\10.2.0\admin\dae\udump\dae_ora_17004_refcursor.trc
    Trace file compatibility: 10.01.00
    Sort options: default
    0 session in tracefile.
    93532 user SQL statements in trace file.
    0 internal SQL statements in trace file.
    93532 SQL statements in trace file.
    5 unique SQL statements in trace file.
    944521 lines in trace file.
    90 elapsed seconds in trace file.
    2. Direct SQL execution:
    TKPROF: Release 10.2.0.1.0 - Production on Wed May 16 11:03:53 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Trace file: D:\oracle\product\10.2.0\admin\dae\udump\dae_ora_17004_sql2.trc
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 6 0 2
    Fetch 0 0.00 0.00 0 0 0 0
    total 4 0.00 0.00 0 6 0 2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 75
    select Category, Sub_Category, Param_Name, Param_Value
    from
    ( ( select distinct 0 as order_c,'TCH Analysis' as Category, NULL as
    Sub_Category,0 as Param_Id, 'Analyzed Sector' as Param_Name, :p_sectorid_1
    as Param_Value, 0 as SORTORDER, 0 as DISTANCE from dual)
    UNION select
    order_c,Category,Sub_Category,Param_Id,Param_Name,stragg(Param_Value) as
    Param_Value,1 as SORTORDER, 0 as DISTANCE from ( select distinct 1 as
    order_c,'TCH Analysis' as Category, NULL as Sub_Category,0 as Param_Id,
    'TCH' as Param_Name, to_char(CHANNEL) as Param_Value, 1 as SORTORDER, 0 as
    DISTANCE from sector_freq_params where SECTOR_ID=:p_SectorId_2 and
    CHAN_TYPE_ID = 2) group by order_c,Category,Sub_Category,Param_Id,
    Param_Name,SORTORDER
    UNION (select r.rr + 1 order_c, 'TCH Analysis' as
    Category, to_char(Sub_Category) as Sub_Category,
    decode(r.rr, 1, 1, 2, 3, 3,
    3, 4, 4, 5, 4) Param_Id,
    decode(r.rr, 1, 'Sector Name', 2, 'Channel
    Number', 3, 'BSIC', 4, 'Relationship', 5, 'Distance to Sector (mi)')
    Param_Name,
    decode(r.rr, 1, SECTOR_ID, 2, Channel_Number, 3, BSIC, 4,
    Relationship, 5, Distance) Param_Value, SORTORDER, DISTANCE from
    (select
    rownum Sub_Category, SECTOR_ID, SORTORDER, Channel_Number, BSIC,
    Relationship, DISTANCE
    from dae_admin.TCH_ANALYSIS_VIEW where
    SELECTED_SECTOR_ID = :p_sectorid_3 and
    SDO_WITHIN_DISTANCE(GEOLOC,
    SELECTED_GEOLOC, 'unit=MILE,distance=25')='TRUE') qry,
    (select 1 rr from
    dual union select 2 from dual union select 3 from dual union select 4 from
    dual union select 5 from dual) r)) order by SORTORDER, DISTANCE, order_c
    asc
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.04 0.03 0 1167 0 0
    Fetch 569 1.20 1.25 0 71026 2 8512
    total 571 1.25 1.29 0 72193 2 8512
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 75
    Rows Row Source Operation
    8512 SORT ORDER BY (cr=86691 pr=0 pw=0 time=1372298 us)
    8512 VIEW (cr=86691 pr=0 pw=0 time=1367047 us)
    8512 SORT UNIQUE (cr=86691 pr=0 pw=0 time=1358534 us)
    8512 UNION-ALL (cr=86691 pr=0 pw=0 time=3191633 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=2 us)
    1 SORT GROUP BY (cr=2457 pr=0 pw=0 time=16109 us)
    3 VIEW (cr=2457 pr=0 pw=0 time=15657 us)
    3 HASH UNIQUE (cr=2457 pr=0 pw=0 time=15651 us)
    3 PARTITION RANGE ALL PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3875 us)
    3 TABLE ACCESS FULL SECTOR_FREQ_PARAMS PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3869 us)
    8510 MERGE JOIN CARTESIAN (cr=84234 pr=0 pw=0 time=1166420 us)
    1702 VIEW (cr=84234 pr=0 pw=0 time=1181142 us)
    1702 COUNT (cr=8834 pr=0 pw=0 time=80783 us)
    1702 HASH JOIN (cr=8834 pr=0 pw=0 time=79089 us)
    11349 HASH JOIN (cr=6377 pr=0 pw=0 time=51629 us)
    3 PARTITION RANGE ALL PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3823 us)
    3 TABLE ACCESS FULL SECTOR_FREQ_PARAMS PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=3817 us)
    3783 NESTED LOOPS (cr=3920 pr=0 pw=0 time=28374 us)
    1 PARTITION RANGE ALL PARTITION: 1 2 (cr=4 pr=0 pw=0 time=91 us)
    1 TABLE ACCESS BY LOCAL INDEX ROWID SECTORS PARTITION: 1 2 (cr=4 pr=0 pw=0 time=78 us)
    1 INDEX RANGE SCAN SECTORS_SECTORID_IND PARTITION: 1 2 (cr=3 pr=0 pw=0 time=39 us)(object id 1834180)
    3783 PARTITION RANGE ALL PARTITION: 1 2 (cr=3916 pr=0 pw=0 time=24510 us)
    3783 TABLE ACCESS BY LOCAL INDEX ROWID SECTORS PARTITION: 1 2 (cr=3916 pr=0 pw=0 time=24504 us)
    3784 DOMAIN INDEX SECTORS_SX (cr=365 pr=0 pw=0 time=13144 us)
    478112 PARTITION RANGE ALL PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=87 us)
    478112 TABLE ACCESS FULL SECTOR_FREQ_PARAMS PARTITION: 1 2 (cr=2457 pr=0 pw=0 time=69 us)
    8510 BUFFER SORT (cr=0 pr=0 pw=0 time=2577 us)
    5 VIEW (cr=0 pr=0 pw=0 time=51 us)
    5 SORT UNIQUE (cr=0 pr=0 pw=0 time=41 us)
    5 UNION-ALL (cr=0 pr=0 pw=0 time=22 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=1 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=0 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=3 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=1 us)
    1 FAST DUAL (cr=0 pr=0 pw=0 time=1 us)
    select text
    from
    view$ where rowid=:1
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 0
    Fetch 2 0.00 0.00 0 4 0 2
    total 6 0.00 0.00 0 4 0 2
    Misses in library cache during parse: 0
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    1 TABLE ACCESS BY USER ROWID VIEW$ (cr=1 pr=0 pw=0 time=14 us)
    select u.name, o.name, a.interface_version#, o.obj#
    from
    association$ a, user$ u, obj$ o where a.obj# = :1
    and a.property = :2
    and a.statstype# = o.obj# and
    u.user# = o.owner#
    call count cpu elapsed disk query current rows
    Parse 5 0.00 0.00 0 0 0 0
    Execute 6 0.00 0.00 0 0 0 0
    Fetch 5 0.00 0.00 0 33 0 4
    total 16 0.00 0.00 0 33 0 4
    Misses in library cache during parse: 0
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    1 NESTED LOOPS (cr=8 pr=0 pw=0 time=82 us)
    1 NESTED LOOPS (cr=6 pr=0 pw=0 time=43 us)
    1 TABLE ACCESS BY INDEX ROWID ASSOCIATION$ (cr=2 pr=0 pw=0 time=26 us)
    1 INDEX RANGE SCAN ASSOC1 (cr=1 pr=0 pw=0 time=11 us)(object id 387)
    1 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=4 pr=0 pw=0 time=14 us)
    1 INDEX UNIQUE SCAN I_OBJ1 (cr=3 pr=0 pw=0 time=9 us)(object id 36)
    1 TABLE ACCESS CLUSTER USER$ (cr=2 pr=0 pw=0 time=36 us)
    1 INDEX UNIQUE SCAN I_USER# (cr=1 pr=0 pw=0 time=3 us)(object id 11)
    declare
    cost sys.ODCICost := sys.ODCICost(NULL, NULL, NULL, NULL);
    obj0 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
    obj1 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
    begin
    :1 := "MDSYS"."SDO_STATISTICS".ODCIStatsFunctionCost(
    sys.ODCIFuncInfo('MDSYS',
    'SDO_3GL',
    'WITHIN_DISTANCE',
    2),
    cost,
    sys.ODCIARGDESCLIST(sys.ODCIARGDESC(2, 'SECTORS', 'DAE_ADMIN', '"GEOLOC"', NULL, NULL, NULL), sys.ODCIARGDESC(2, 'SECTORS', 'DAE_ADMIN', '"GEOLOC"', NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL))
    , obj0, obj1, :5,
    sys.ODCIENV(:6,:7,:8,:9));
    if cost.CPUCost IS NULL then
    :2 := -1.0;
    else
    :2 := cost.CPUCost;
    end if;
    if cost.IOCost IS NULL then
    :3 := -1.0;
    else
    :3 := cost.IOCost;
    end if;
    if cost.NetworkCost IS NULL then
    :4 := -1.0;
    else
    :4 := cost.NetworkCost;
    end if;
    exception
    when others then
    raise;
    end;
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 2
    Fetch 0 0.00 0.00 0 0 0 0
    total 4 0.00 0.00 0 0 0 2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 75 (recursive depth: 1)
    declare
    sel number;
    obj0 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
    obj1 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
    begin
    :1 := "MDSYS"."SDO_STATISTICS".ODCIStatsSelectivity(
    sys.ODCIPREDINFO('MDSYS',
    'SDO_3GL',
    'WITHIN_DISTANCE',
    173),
    sel,
    sys.ODCIARGDESCLIST(sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(2, 'SECTORS', 'DAE_ADMIN', '"GEOLOC"', NULL, NULL, NULL), sys.ODCIARGDESC(2, 'SECTORS', 'DAE_ADMIN', '"GEOLOC"', NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL)),
    :3,
    :4
    , obj0, obj1, :5,
    sys.ODCIENV(:6,:7,:8,:9));
    if sel IS NULL then
    :2 := -1.0;
    else
    :2 := sel;
    end if;
    exception
    when others then
    raise;
    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: 75 (recursive depth: 1)
    select a.default_cpu_cost, a.default_io_cost
    from
    association$ a where a.obj# = :1
    and a.property = :2
    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 1 0.00 0.00 0 1 0 0
    total 3 0.00 0.00 0 1 0 0
    Misses in library cache during parse: 0
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    0 TABLE ACCESS BY INDEX ROWID ASSOCIATION$ (cr=1 pr=0 pw=0 time=7 us)
    0 INDEX RANGE SCAN ASSOC1 (cr=1 pr=0 pw=0 time=6 us)(object id 387)
    declare
    cost sys.ODCICost := sys.ODCICost(NULL, NULL, NULL, NULL);
    obj1 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
    obj2 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
    begin
    :1 := "MDSYS"."SDO_STATISTICS".ODCIStatsIndexCost(
    sys.ODCIINDEXINFO('DAE_ADMIN',
    'SECTORS_SX',
    sys.ODCICOLINFOLIST(sys.ODCICOLINFO('DAE_ADMIN', 'SECTORS', '"GEOLOC"', 'SDO_GEOMETRY', 'MDSYS', NULL)),
    NULL,
    3,
    0),
    1.00000000,
    cost,
    sys.ODCIQUERYINFO(2,
    NULL),
    sys.ODCIPREDINFO('MDSYS',
    'SDO_WITHIN_DISTANCE',
    NULL,
    141),
    sys.ODCIARGDESCLIST(sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(2, 'SECTORS', 'DAE_ADMIN', '"GEOLOC"', NULL, NULL, NULL), sys.ODCIARGDESC(2, 'SECTORS', 'DAE_ADMIN', '"GEOLOC"', NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL)),
    :6,
    :7
    , obj2, :8,
    sys.ODCIENV(:9,:10,:11,:12));
    if cost.CPUCost IS NULL then
    :2 := -1.0;
    else
    :2 := cost.CPUCost;
    end if;
    if cost.IOCost IS NULL then
    :3 := -1.0;
    else
    :3 := cost.IOCost;
    end if;
    if cost.NetworkCost IS NULL then
    :4 := -1.0;
    else
    :4 := cost.NetworkCost;
    end if;
    :5 := cost.IndexCostInfo;
    exception
    when others then
    raise;
    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 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 75 (recursive depth: 1)
    SELECT diminfo, nvl(srid,-1)
    FROM
    ALL_SDO_GEOM_METADATA WHERE OWNER = 'DAE_ADMIN' AND TABLE_NAME =
    NLS_UPPER('SECTORS') AND '"'||COLUMN_NAME||'"' = '"GEOLOC"'
    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 1 0.00 0.00 0 44 0 1
    total 3 0.00 0.00 0 44 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID SDO_GEOM_METADATA_TABLE (cr=44 pr=0 pw=0 time=1743 us)
    1 INDEX RANGE SCAN SDO_GEOM_IDX (cr=43 pr=0 pw=0 time=1732 us)(object id 45847)
    1 UNION-ALL (cr=42 pr=0 pw=0 time=1702 us)
    1 FILTER (cr=42 pr=0 pw=0 time=1697 us)
    1 HASH JOIN (cr=42 pr=0 pw=0 time=1694 us)
    1 MERGE JOIN CARTESIAN (cr=42 pr=0 pw=0 time=955 us)
    1 NESTED LOOPS (cr=42 pr=0 pw=0 time=462 us)
    1 NESTED LOOPS OUTER (cr=38 pr=0 pw=0 time=446 us)
    1 HASH JOIN OUTER (cr=35 pr=0 pw=0 time=434 us)
    1 NESTED LOOPS OUTER (cr=17 pr=0 pw=0 time=111 us)
    1 NESTED LOOPS OUTER (cr=17 pr=0 pw=0 time=107 us)
    1 NESTED LOOPS (cr=17 pr=0 pw=0 time=100 us)
    3 NESTED LOOPS (cr=9 pr=0 pw=0 time=61 us)
    1 TABLE ACCESS BY INDEX ROWID USER$ (cr=2 pr=0 pw=0 time=16 us)
    1 INDEX UNIQUE SCAN I_USER1 (cr=1 pr=0 pw=0 time=6 us)(object id 44)
    3 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=7 pr=0 pw=0 time=44 us)
    3 INDEX RANGE SCAN I_OBJ2 (cr=4 pr=0 pw=0 time=16 us)(object id 37)
    1 TABLE ACCESS CLUSTER TAB$ (cr=8 pr=0 pw=0 time=36 us)
    1 INDEX UNIQUE SCAN I_OBJ# (cr=5 pr=0 pw=0 time=18 us)(object id 3)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=3 us)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=2 us)(object id 36)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=1 us)(object id 36)
    75 TABLE ACCESS FULL USER$ (cr=18 pr=0 pw=0 time=35 us)
    0 TABLE ACCESS CLUSTER SEG$ (cr=3 pr=0 pw=0 time=10 us)
    0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=3 pr=0 pw=0 time=9 us)(object id 9)
    1 TABLE ACCESS CLUSTER TS$ (cr=4 pr=0 pw=0 time=13 us)
    1 INDEX UNIQUE SCAN I_TS# (cr=2 pr=0 pw=0 time=6 us)(object id 7)
    1 BUFFER SORT (cr=0 pr=0 pw=0 time=489 us)
    1 FIXED TABLE FULL X$KSPPI (cr=0 pr=0 pw=0 time=470 us)
    1120 FIXED TABLE FULL X$KSPPCV (cr=0 pr=0 pw=0 time=1125 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=0 us)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 MERGE JOIN CARTESIAN (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 TABLE ACCESS CLUSTER TAB$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_OBJ# (cr=0 pr=0 pw=0 time=0 us)(object id 3)
    0 TABLE ACCESS CLUSTER COL$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID COLTYPE$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_COLTYPE2 (cr=0 pr=0 pw=0 time=0 us)(object id 170)
    0 TABLE ACCESS CLUSTER TS$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_TS# (cr=0 pr=0 pw=0 time=0 us)(object id 7)
    0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us)(object id 9)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ3 (cr=0 pr=0 pw=0 time=0 us)(object id 38)
    0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us)(object id 11)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
    0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us)(object id 11)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
    0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us)(object id 11)
    0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KSPPI (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KSPPCV (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=0 us)
    0 VIEW ALL_SYNONYMS (cr=0 pr=0 pw=0 time=0 us)
    0 SORT UNIQUE (cr=0 pr=0 pw=0 time=0 us)
    0 UNION-ALL (cr=0 pr=0 pw=0 time=0 us)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 TABLE ACCESS BY INDEX ROWID SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_SYN1 (cr=0 pr=0 pw=0 time=0 us)(object id 101)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 VIEW ALLSYNONYMS_TREE (cr=0 pr=0 pw=0 time=0 us)
    0 CONNECT BY WITH FILTERING (cr=0 pr=0 pw=0 time=0 us)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 COUNT (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_SYN1 (cr=0 pr=0 pw=0 time=0 us)(object id 101)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 CONNECT BY PUMP (cr=0 pr=0 pw=0 time=0 us)
    0 COUNT (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
    0 COUNT (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_SYN1 (cr=0 pr=0 pw=0 time=0 us)(object id 101)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID SYN$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_SYN1 (cr=0 pr=0 pw=0 time=0 us)(object id 101)
    0 FILTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS OUTER (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS BY INDEX ROWID USER$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX UNIQUE SCAN I_USER1 (cr=0 pr=0 pw=0 time=0 us)(object id 44)
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJ2 (cr=0 pr=0 pw=0 time=0 us)(object id 37)
    0 INDEX UNIQUE SCAN I_TYPED_VIEW1 (cr=0 pr=0 pw=0 time=0 us)(object id 100)
    0 INDEX UNIQUE SCAN I_VIEW1 (cr=0 pr=0 pw=0 time=0 us)(object id 99)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=0 us)
    SELECT nvl(sdo_level,0), nvl(sdo_numtiles,0), nvl(sdo_maxlevel, 0),
    nvl(sdo_index_table, 'DEFAULT'), sdo_index_primary, sdo_index_type,
    nvl(sdo_rtree_height, 0), nvl(sdo_rtree_num_nodes, 0),
    nvl(sdo_rtree_dimensionality, 0), nvl(sdo_rtree_fanout, 0),
    nvl(sdo_rtree_root, 'EMPTY'), nvl(sdo_rtree_seq_name, 'DEFAULT'),
    sdo_index_partition, nvl(sdo_partitioned, 0), nvl(sdo_layer_gtype,
    'DEFAULT'), nvl(sdo_index_dims, 0), nvl(sdo_rtree_pctfree, 10),
    nvl(sdo_rtree_quality, 1), nvl(sdo_index_version, 0), nvl(sdo_tablespace,
    'DEFAULT'), nvl(sdo_index_geodetic, 'FALSE'), sdo_index_status,
    nvl(sdo_nl_index_table, 'NULL'), nvl(sdo_dml_batch_size, 1),
    nvl(sdo_rtree_ent_xpnd, 0.0)
    FROM
    all_sdo_index_metadata WHERE sdo_index_owner = 'DAE_ADMIN' and
    sdo_index_name = 'SECTORS_SX' and sdo_index_partition = UPPER(:ptname)
    ORDER BY SDO_INDEX_PRIMARY
    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 1 0.00 0.00 0 43 0 1
    total 3 0.00 0.00 0 43 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    select count(*)
    from
    mdsys.geodetic_srids where srid = 99900001
    call count cpu elapsed disk query current rows
    Parse 3405 0.01 0.01 0 0 0 0
    Execute 3405 0.04 0.03 0 0 0 0
    Fetch 3405 0.07 0.03 0 10215 0 3405
    total 10215 0.14 0.08 0 10215 0 3405
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=3 pr=0 pw=0 time=26 us)
    0 TABLE ACCESS BY INDEX ROWID SDO_CS_SRS (cr=3 pr=0 pw=0 time=17 us)
    1 INDEX UNIQUE SCAN SYS_C003941 (cr=2 pr=0 pw=0 time=9 us)(object id 48833)
    select wktext, srid
    from
    mdsys.cs_srs where srid = 99900001
    call count cpu elapsed disk query current rows
    Parse 1704 0.00 0.01 0 0 0 0
    Execute 1704 0.00 0.01 0 0 0 0
    Fetch 1704 0.03 0.01 0 5112 0 1704
    total 5112 0.03 0.03 0 5112 0 1704
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID SDO_CS_SRS (cr=3 pr=0 pw=0 time=8 us)
    1 INDEX UNIQUE SCAN SYS_C003941 (cr=2 pr=0 pw=0 time=5 us)(object id 48833)
    SELECT partition_count
    FROM
    all_part_indexes WHERE owner='DAE_ADMIN' and index_name='SECTORS_SX'
    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 1 0.00 0.00 0 18 0 1
    total 3 0.00 0.00 0 18 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    Rows Row Source Operation
    1 FILTER (cr=18 pr=0 pw=0 time=70 us)
    1 NESTED LOOPS (cr=18 pr=0 pw=0 time=67 us)
    1 NESTED LOOPS OUTER (cr=15 pr=0 pw=0 time=59 us)
    1 NESTED LOOPS (cr=13 pr=0 pw=0 time=52 us)
    1 NESTED LOOPS (cr=10 pr=0 pw=0 time=42 us)
    1 NESTED LOOPS (cr=7 pr=0 pw=0 time=29 us)
    1 TABLE ACCESS BY INDEX ROWID USER$ (cr=2 pr=0 pw=0 time=8 us)
    1 INDEX UNIQUE SCAN I_USER1 (cr=1 pr=0 pw=0 time=4 us)(object id 44)
    1 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=5 pr=0 pw=0 time=20 us)
    1 INDEX RANGE SCAN I_OBJ2 (cr=4 pr=0 pw=0 time=14 us)(object id 37)
    1 TABLE ACCESS BY INDEX ROWID PARTOBJ$ (cr=3 pr=0 pw=0 time=10 us)
    1 INDEX UNIQUE SCAN I_PARTOBJ$ (cr=2 pr=0 pw=0 time=6 us)(object id 263)
    1 TABLE ACCESS BY INDEX ROWID IND$ (cr=3 pr=0 pw=0 time=8 us)
    1 INDEX UNIQUE SCAN I_IND1 (cr=2 pr=0 pw=0 time=5 us)(object id 39)
    0 TABLE ACCESS CLUSTER TS$ (cr=2 pr=0 pw=0 time=6 us)
    0 INDEX UNIQUE SCAN I_TS# (cr=2 pr=0 pw=0 time=4 us)(object id 7)
    1 INDEX UNIQUE SCAN I_OBJ1 (cr=3 pr=0 pw=0 time=7 us)(object id 36)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=0 us)
    SELECT nvl(sdo_index_partition, 'DEFAULT'), nvl(sdo_index_table, 'DEFAULT'),
    nvl(sdo_rtree_height,0), nvl(sdo_rtree_num_nodes,0),
    nvl(sdo_rtree_root,'EMPTY'), nvl(sdo_layer_gtype, 'DEFAULT'),
    nvl(sdo_index_status, 'VALID'), sdo_root_mbr
    FROM
    all_sdo_index_metadata WHERE sdo_index_owner='DAE_ADMIN' and sdo_index_name=
    'SECTORS_SX' and sdo_index_partition is not null ORDER BY
    sdo_index_partition
    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.00 0.00 0 45 0 2
    total 4 0.00 0.00 0 45 0 2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    Rows Row Source Operation
    2 TABLE ACCESS BY INDEX ROWID SDO_INDEX_METADATA_TABLE (cr=45 pr=0 pw=0 time=155 us)
    2 INDEX RANGE SCAN SDO_IDX_MDATA_IDX (cr=43 pr=0 pw=0 time=142 us)(object id 48798)
    1 FILTER (cr=40 pr=0 pw=0 time=121 us)
    1 NESTED LOOPS OUTER (cr=40 pr=0 pw=0 time=118 us)
    1 NESTED LOOPS OUTER (cr=38 pr=0 pw=0 time=111 us)
    1 NESTED LOOPS OUTER (cr=34 pr=0 pw=0 time=100 us)
    1 NESTED LOOPS (cr=31 pr=0 pw=0 time=92 us)
    1 NESTED LOOPS (cr=22 pr=0 pw=0 time=78 us)
    1 NESTED LOOPS OUTER (cr=18 pr=0 pw=0 time=66 us)
    1 NESTED LOOPS (cr=15 pr=0 pw=0 time=56 us)
    3 NESTED LOOPS (cr=9 pr=0 pw=0 time=34 us)
    1 TABLE ACCESS BY INDEX ROWID USER$ (cr=2 pr=0 pw=0 time=6 us)
    1 INDEX UNIQUE SCAN I_USER1 (cr=1 pr=0 pw=0 time=4 us)(object id 44)
    3 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=7 pr=0 pw=0 time=24 us)
    3 INDEX RANGE SCAN I_OBJ2 (cr=4 pr=0 pw=0 time=9 us)(object id 37)
    1 TABLE ACCESS BY INDEX ROWID IND$ (cr=6 pr=0 pw=0 time=20 us)
    1 INDEX UNIQUE SCAN I_IND1 (cr=5 pr=0 pw=0 time=12 us)(object id 39)
    1 TABLE ACCESS CLUSTER TS$ (cr=3 pr=0 pw=0 time=9 us)
    1 INDEX UNIQUE SCAN I_TS# (cr=2 pr=0 pw=0 time=4 us)(object id 7)
    1 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=4 pr=0 pw=0 time=10 us)
    1 INDEX UNIQUE SCAN I_OBJ1 (cr=3 pr=0 pw=0 time=6 us)(object id 36)
    1 TABLE ACCESS CLUSTER USER$ (cr=9 pr=0 pw=0 time=13 us)
    1 INDEX UNIQUE SCAN I_USER# (cr=1 pr=0 pw=0 time=3 us)(object id 11)
    0 TABLE ACCESS CLUSTER SEG$ (cr=3 pr=0 pw=0 time=7 us)
    0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=3 pr=0 pw=0 time=6 us)(object id 9)
    1 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=4 pr=0 pw=0 time=7 us)
    1 INDEX UNIQUE SCAN I_OBJ1 (cr=3 pr=0 pw=0 time=4 us)(object id 36)
    1 TABLE ACCESS CLUSTER USER$ (cr=2 pr=0 pw=0 time=6 us)
    1 INDEX UNIQUE SCAN I_USER# (cr=1 pr=0 pw=0 time=2 us)(object id 11)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=0 pr=0 pw=0 time=0 us)(object id 103)
    0 FIXED TABLE FULL X$KZSRO (cr=0 pr=0 pw=0 time=0 us)
    0 FIXED TABLE FULL X$KZSPR (cr=0 pr=0 pw=0 time=0 us)
    SELECT info
    from
    DAE_ADMIN.MDRT_1BFCC9$ where rowid = :rid
    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 1 0.00 0.00 0 1 0 1
    total 3 0.00 0.00 0 1 0 1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    Rows Row Source Operation
    1 TABLE ACCESS BY USER ROWID MDRT_1BFCC9$ (cr=1 pr=0 pw=0 time=14 us)
    SELECT info
    from
    DAE_ADMIN.MDRT_1C72A2$ where rowid = :rid
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 187 0.00 0.00 0 0 0 0
    Fetch 187 0.01 0.00 0 187 0 187
    total 376 0.01 0.00 0 187 0 187
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62 (recursive depth: 1)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 3 0.00 0.00 0 0 0 0
    Execute 3 0.04 0.03 0 1173 0 2
    Fetch 569 1.20 1.25 0 71026 2 8512
    total 575 1.25 1.29 0 72199 2 8514
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 5128 0.01 0.03 0 0 0 0
    Execute 5314 0.04 0.05 0 0 0 3
    Fetch 5310 0.12 0.04 0 15703 0 5308
    total 15752 0.18 0.12 0 15703 0 5311
    Misses in library cache during parse: 0
    5123 user SQL statements in session.
    8 internal SQL statements in session.
    5131 SQL statements in session.
    Trace file: D:\oracle\product\10.2.0\admin\dae\udump\dae_ora_17004_sql2.trc
    Trace file compatibility: 10.01.00
    Sort options: default
    0 session in tracefile.
    5123 user SQL statements in trace file.
    8 internal SQL statements in trace file.
    5131 SQL statements in trace file.
    16 unique SQL statements in trace file.
    50973 lines in trace file.
    21 elapsed seconds in trace file.

  • Same query on different RAC instance huge execution time difference

    we have 3 nodes oracle 10gR2 RAC based on ASM. The 3rd node is the latest one we added into the cluster. All instances on 3 nodes using the same system parameters and same OS and same hardware
    i found a weird problem, a same query i executed on node1 is way more faster than on node3 (1.5mins VS. 18mins). Then i did trace, surprising found the fetch time for node3 is longer than node1. Both nodes are at very low load. here is part of tracing for both nodes:
    node1:
    call count cpu elapsed disk query current rows
    Parse 1 3.40 3.47 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 2 19.13 97.04 69938 269374 0 7
    total 4 22.54 100.51 69938 269374 0 7
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 5
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    row cache lock 132 0.00 0.03
    library cache lock 13 0.00 0.00
    library cache pin 9 0.00 0.00
    rdbms ipc reply 6 0.00 0.00
    latch: shared pool 1 0.00 0.00
    SQL*Net message to client 2 0.00 0.00
    gc current block 2-way 2061 0.00 0.67
    gc cr multi block request 76610 0.18 7.71
    gc current block 3-way 801 0.00 0.33
    gc cr block 3-way 3 0.00 0.00
    gc cr block 2-way 30 0.00 0.01
    db file scattered read 1167 0.02 3.66
    gc cr grant 2-way 24739 0.00 4.81
    db file sequential read 37363 0.12 57.35
    latch: KCL gc element parent latch 7 0.00 0.00
    db file parallel read 1465 0.05 5.86
    latch: cache buffers lru chain 1 0.00 0.00
    gc current grant 2-way 1 0.00 0.00
    gc cr block busy 10 0.17 0.37
    gc cr disk read 1 0.00 0.00
    SQL*Net more data to client 5 0.00 0.00
    SQL*Net message from client 2 436.40 436.40
    node3
    call count cpu elapsed disk query current rows
    Parse 1 2.58 2.64 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 2 11.35 299.22 37084 269364 0 7
    total 4 13.94 301.86 37084 269364 0 7
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 5
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    library cache lock 3 0.00 0.00
    row cache lock 10 0.00 0.00
    SQL*Net message to client 2 0.00 0.00
    gc cr grant 2-way 23126 0.01 5.01
    db file sequential read 37080 1.30 277.16
    gc cr multi block request 1 0.00 0.00
    db file scattered read 1 0.31 0.31
    read by other session 721 0.03 2.12
    gc buffer busy 1248 0.03 4.78
    latch: cache buffers chains 5 0.00 0.00
    gc current block 3-way 332 0.00 0.17
    gc current block 2-way 834 0.00 0.30
    latch: KCL gc element parent latch 1 0.00 0.00
    gc current grant 2-way 1 0.00 0.00
    SQL*Net more data to client 5 0.00 0.00
    SQL*Net message from client 2 76.12 76.12
    And all the execution plan are the same.
    Could anybody please tell me why this happens?
    Thanks!

    To me, it looks like node3 is not accessing storage as fast as node 1 is. Look at this:
    db file sequential read 37363 0.12 57.35
    db file sequential read 37080 1.30 277.16
    both cases have roughly the same amount of reads/waits but the time waited is 5 times more in the second case. So this could indicate a problem, maybe something with the HBA or SAN path or something like that.
    Bjoern

  • Different execution plan for same query but for different condition value

    Hi All,
    I'm facing a strange situation where same query for different condition not working.
    1--
    Select  top 10 * from revenuefact(nolock) 
    where feecode ='OW4'
    2--
    Select  top 10 * from revenuefact(nolock)
    where feecode ='BTE'
    1st query is returning result easily but 2nd query is taking too long. Column
    feecode has already Non-clustered index and Clustered index is also available for another col RevenueSID.
    I was surprised when checked the query execution plan for both the above queries  which is quite different (as per attached below). Can anyone suggest me the reason behind it.
    And solution for the same. One more thing that data for feecode BTE is inserting through different source instead of others feecode and table contains more than 300 million rows.

    When I speak with people inside Microsoft who work with the optimizer, the refuse to accept the work "bug" when a query produces the correct result, but with a suboptimal plan. They prefer to use the word "limitation".
    The limitation here is that when the optimizer compares two plans, it only looks at the estimated cost. As far as I know, it does not perform any analysis from the perspective "what if the statistics are wrong"? They do provide the hint OPTIMIZE
    FOR UNKNOWN, but that does not work then there is a constant as in this case.
    The optimizer will surely distinguish between TOP 10 and TOP 10000000. With the latter, you have all reason to expect a Clustered Index Scan no matter which value you search for - unless you pick a value for which the histogram indicates that there are no
    rows.
    Interesting enough, I was able to reproduce the situation in my Northgale database, which is an inflated version of Northwind, and where statistics should be accurate.
    SELECT TOP 10 * FROM Orders WHERE EmployeeID = 8
    results in a CI scan, and so does also EmployeeID = 7, and even 5. There are only 2292 rows out of a total of 344305 rows. If I try EmployeeID 808 for which there are 1797, the optimizer goes for the index seek.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??

    Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??

    Hi SandyS_VZW,
    Yes tried resetting the wifi connection and problem still persist.
    Here it is...to make it clear. Connected thru the same wifi at home...
    -> emails (yahoo/gmail) and facebook WEBSITES are working fine and fast when using/accessing thru a browser (chrome/samsung browser) - no problem with this.
    -> emails (yahoo/gmail) and facebook APP is soooooo sloooww (thru the App). Slow I mean comparing it to using their browser/websites... news feeds/emails refreshing so quickly but not when using the APP installed in Samsung Galaxy Note 4. Slow like - It will take around 5-10minutes just to get your emails and news feed refreshed.
    THIS HAPPENS ONLY WHEN CONNECTED THRU A WIFI which has a speed of 10-20mb. It is not happening when connected to the network data/plan.
    My wife has the same Samsung Galaxy Note 4 (coming from different provider at&t) - same setup (emails, fb app), same wifi connection, but she's not experiencing anything like it.
    Not sure why, I dont want to believe that while connected to a WIFI, Verizon is restricting anything and ******* me off to make me switch to my data plan connection everytime - which is Unfair!
    Was there a known issue similar about this case?
    thanks,

  • Same query at same time, but different execution plans from two schemas

    Hi!
    We just had some performance problems in our production system and I would like to ask for some advice from you.
    We had a select-query that was run from USER1 on SCHEMA1, and it ran a table scan on a huge table.
    Using session browser in TOAD I copied the Sql-statement, logged on SCHEMA1 and ran the same query. I got a different execution plan where I avoided the table scan.
    So my question is:
    How is it possible that the same query get different execution plans when running in two different schemas at the same time.
    Some more information:
    The user USER1 runs "alter session set current_schema=SCHEMA1;" when it logs on. Besides that it doesn't do anything so session parameter values are the same for USER1 and SCHEMA1.
    SCHEMA1 is the schema owning the tables.
    ALL_ROWS is used for both USER1 and SCHEMA1
    Our database:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE     9.2.0.8.0     Production
    TNS for Linux: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    Anybody has some suggestions to why I experience different execution plan for the same query, run at the same time, but from different users?

    Thanks for clarification of the schema structure.
    What happens if instead of setting the current session schema to SCHEMA1, if you simply add the schema name to alle tables, views and other objects inside your select statement?
    As in select * from schema1.dual;I know that this is not what you want eventually, but it might help to find any misleading objects.
    Furthermore it is not clear what you meant with: "avoided a table scan".
    Did you avoid a full table scan (FTS) or was the table completely removed from the execution plan?
    Can you post both plans?
    Edited by: Sven W. on Mar 30, 2010 5:27 PM

  • Huge difference in Execution time in same Query with different Parameter

    Hi Experts,
    We are facing an unique problem once we are executing the query in HANA SQL prompt. This Query was generated from BObj and executing in HANA system. Once this query running with following condition, it is taking almost 7-00 minute to execute and returning around 924 rows.
    << WHERE
    Table__1."LOGSYS"  IN  ('RKGCLNT102')
    AND
    Table__1."CompanyCode"  IN  ('7240','7245')
    AND
    Table__1."Plant"  IN ……………… >
    However if we run the same query with some different plant, It is taking only 2 second. Please find the Query here.
    << WHERE
    Table__1."LOGSYS"  IN  ('RKGCLNT102')
    AND
    Table__1."CompanyCode"  IN  ('7245','7600')
    AND
    Table__1."Plant"  IN ……………… >
    This is really an unexpected behavior and we are not able to get the actual reason why it is behaving like this.
    Could anyone please help to analyze this issue to fine the root cause.
    Thanks in Advance.
    Regards
    Satrajit.

    Hi there
    Unfortunately you provided too few information to analyze the issue.
    Maybe the underlying tables have very skew data and the first select has to read a larger share of the base tables.
    Maybe the columns had been unloaded before and the first query had to load them into memory first.
    Is the runtime always bad with the one and always good with the other set of parameters?
    Have you checked the PlanViz for both versions? How do these differ?
    - Lars

  • Cost of execution of a query

    Hi,
    I have two queries both give exactly the same result set , both the queries are identical just with one difference , in one query we have code = '51 2345' and in the other query we have text = 'impulse' , which is the text value for the code .
    The query with text in the condition gives cost = 1450
    and the query with code in the condition gives cost = 332 .
    But the query with cost = 1450 takes 4 mins to execute
    and the query with cost = 332 takes 40 mins to execute .
    Is it possible that cost of execution as shown by running the explain plan for that query is more and still its fast .so if yes then how to determine why is one query fast and the other query slow.
    Thanks.

    Hi,
    I have two queries both give exactly the same result set , both the queries are identical just with one difference , in one query we have code = '51 2345' and in the other query we have text = 'impulse' , which is the text value for the code .
    The query with text in the condition gives cost = 1450
    and the query with code in the condition gives cost = 332 .
    But the query with cost = 1450 takes 4 mins to execute
    and the query with cost = 332 takes 40 mins to execute .
    Is it possible that cost of execution as shown by running the explain plan for that query is more and still its fast .so if yes then how to determine why is one query fast and the other query slow.
    Thanks.

  • SQL Server 2012 Physical vs. Hyper-V Same Query Different Results

    I have a database that is on physical hardware (16 CPU's, 32GB Ram).
    I have a copy of the database that was attached to a virtual Hyper-V server (16 CPU's, 32GB Ram).
    Both Servers and SQL Servers are identical OS=2008R2 Standard, SQL Server 2012R2 Standard same patch level SP1 CU8.
    Same query run on both servers return same data set, but the time is much different 26 Sec on Physical, 5 minutes on virtual.
    Statistics are identical on both databases, query execution plane is identical on both queries.
    Indices are identical on both databases.
    When I use set statistics IO, I get different results between the two servers.
    One table in particular (366k rows) on physical shows logical reads of 15400, on Hyper-V reports logical reads of 418,000,000 that is four hundred eighteen million for the same table.
    When the query is run on the physical it uses no CPU, when run on the Hyper-V it takes 100% of all 16 processors.
    I have experimented with Maxdop and it does exactly what it should by limiting processors but it doesn't fix the issue.

    A massive difference in logical reads usually hints at differences in the query plan.
    When you compare query plans, it is essential that you look at actual query plans.
    Please note that if your server / Hyper-V supports parallelism (which is almost always nowadays), then you are likely to have two query plans: a parallel and a serial query plan. Of course the actual query plan will make clear which one is used in which
    case.
    To say this again, this is by far the most likely reason for your problem.
    There are other (unlikely) reasons that could be the case here:
    runaway parallel threads or other bugs in the optimizer or engine. Make sure you have installed the latest service pack
    Maybe the slow server (Hyper-V) has extreme fragmentation in the relevant tables
    As mentioned by Erland, you have much much more information about the query and query plan than we do. You already know whether or not parallelism is used, how many threads are being used in it, if you have no, one or several Loop Joins in the query (my
    bet is on at least one, possibly more), etc. etc.
    With the limited information you can share (or choose to share), involving PSS is probably your best course of action.
    Gert-Jan

  • Mac mini Core Solo is a great deal slower then 1.5ghz mac mini G4??

    I have two mac minis, one has a 1.5 Ghz G4 and the other has a 1.5 Ghz Core Solo. Both have 512mb of RAM and OS X 10.4.7. I have the same software installed between them. They both have the latest updates for Office 2004 installed, both have the latest system updates, latest Firefox updates, both have latest Adobe Reader updates, and both have Quark 6.5 installed.
    The Core Solo mac mini is WAY slower then the G4, Entourage in particular is almost slow to the point it is unworkable. Is this due to the Rosetta emulation? What can I do to improve this, will increasing the ram to 1 GB clear these speed issues or am I going to have to return this mini and get one with a Core Duo?
    The current sluggishness on the Core Solo mini is unbearable, literally my Powerbook G4 667mhz with 768mb of ram is loads faster then this mini is. I'm thinking more RAM will do the trick, but wanted to bounce this off of some other experts here first. Thanks.

    Entourage in particular is almost slow to the point it is unworkable. Is this due to the Rosetta emulation?
    Yes, almost certainly. Microsoft Office is not yet Intel-native, so it's gonig to run more slowly than a native edition would. The same will apply to any PowerPC-only software.
    What can I do to improve this, will increasing the ram to 1 GB clear these speed issues
    I can't say for certain, but other users have reported that increasing the RAM to 1GB (or beyond) has made significant improvements in performance.

  • I just update my iMac from Mountain Lion to Mavericks and the application are slow to open. The same happens to opening webpages . Please help

    just update my iMac from Mountain Lion to Mavericks and the application are slow to open. The same happens to opening webpages . Please help

    Resetting your Mac's PRAM and NVRAM
    Intel-based Macs: Resetting the System Management Controller (SMC)
    Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
    Reinstalling Mavericks, Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion, Mavericks: Select Reinstall Lion/Mountain Lion, Mavericks and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

Maybe you are looking for