Slow performance of getObject on ref cursor

Hi guys and gals,
I have a performance issue in accessing data from a ref cursor. The getObject statement is unbelievably slow. In one case, it takes as long as 3 seconds to execute a single getObject statement. I have tested this using a simple System.currentTimeMillis() before and after the statement in question.
The basic scenario is as follows :
I utilise a class that calls an Oracle PL/SQL Stored Procedure using a CallableStatement. The calling class executes on a Web Server, the Oracle ( DB Server ) resides on a different machine ( standard 3 tier stuff ). Network traffic is not a problem. A number of the output parameters registered for the CallableStatement are ref cursors. After the CallableStatement is executed, I use a getObject and cast it to a Result Set object as follows :
objResults = (ResultSet) objCallable.getObject(18);
Where the 18th param has been registered like so :
objCallable.registerOutParameter (18, OracleTypes.CURSOR);
The volume of data is certainly not excessive, typically 80 - 100 rows of data that (eventually) find their way into the drop down list on a Web Page.
About 5 other ref cursors are used and their data accessed in like manner, some of these taking between 1 & 1.5 seconds each to execute. So the whole process of retrieving from these ref cursors via getObject can take almost 10 seconds.
Has anyone experienced this kind of performance problem before, and if so, how can this be optimized ?

Hey folks. Has anybody out there got to the bottom of this? I currently have a situation where my querys can take less than half a second to execute and only return a few rows (which contain only 4 columns of data) taking at most a second to run and yet take up to 30 seconds to return the ResultSet. The most annoying thing is the lack of consistancy, it seems no matter how many times you run it you get different results.
I'm using classes12.jar driver and running on both Windows (development) and Linux(production) on Oracle 8.0.5.
Any help would be hugely appreciated.

Similar Messages

  • Open ref cursor in a procedure

    Hi
    I have a procedure which has 3 input parameters and 1 REF CURSOR type OUT parameter.
      In the body of the procedure a select query is dynamically being created, and just before the end of the procedure the REF CURSOR is opened for SELECT(dynamic) query
    For Ex: Create or replace procedure proc_name(a in number,b in number,c in number,RETVAL OUT REF CURSOR) as
    decalre
      strQry varchar2(3000);
    begin
       -- strQry is select query built dynamically
    OPEN RETVAL for strQry;
    end proc_name;
    This procedure is being called by a java application. My question is what the open cursor statement is doing in the procedure?
    Any ideas? Thanks!
    greddy

    Hi,
    As i know, for example if we want to generate a report for some particular records in our project.consider we are using java as front end and oracle as backend. ok. In that case we need to bring the data from backend to front end ,for that in backend (oracle) we can write procedure to perform this task using ref cursors.
    Note: ref cursor will provide the most efficient way in bringing the records from back end to front end.
    Create or replace procedure proc_name(a in number,b in number,c in number,RETVAL OUT REF CURSOR) as
    decalre
    strQry varchar2(3000);
    begin
    -- strQry is select query built dynamically
    --if we are using dynamic query, we can filter out the records using id or name or date
    once we did, we need to pass the values to calling enviroment, since we declared the ref cursor as out parameter, we can use the ref cursor to pass the values to calling enviroment. Since we are using ref cursor we need to open the cursor for that dynamic query.
    OPEN RETVAL for strQry;
    end proc_name;
    hope this information is some what helpful. if you got any details regarding this please post it..
    thanks.

  • Performance problem with sproc and out parameter ref cursor

    Hi
    I have sproc with Ref Cursor as an OUT parameter.
    It is extremely slow looping over the ResultSet (does it record by record in the fetch).
    so I have added setPrefetchRowCount(100) and setPrefetchMemorySize(6000)
    pseudo code below:
    string sqlSmt = "BEGIN get_tick_data( :v1 , :v2); END;";
    Statement* s = connection->createStatement(sqlStmt);
    s->setString(1, i1);
    // cursor ( f1 , f2, f3 , f4 , i1 ) f for float type and i for interger value.
    // 5 columns as part of cursor with 4 columns are having float value and
    // 1 column is having int value assuming 40 bytes for one rec.
    s->setPrefetchRowCount (100);
    s->PrefetchMemorySize(6000);
    s->registerOutParam(2,OCCICURSOR);
    s->execute();
    ResultSet* rs = s->getCursor(2);
    while (rs->next()) {
    // do, and do v slowly!
    }

    Hi,
    I have the same problem. It seems, when retrieving cursor, that "setPrefetchRowCount" is not taking into account by OCCI. If you have a SQL statement like "SELECT STR1, STR2, STR3 FROM TABLE1" that works fine but if your SQL statement is a call to a stored procedure returning a cursor each row fetching need a roudtrip.
    To avoid this problem you need to use the method "setDataBuffer" from the object "ResultSet" for each column of your cursor. It's easy to use with INT type and STRING type, a lit bit more complex with DATE type. But until now, I'm not able to do the same thing with REF type.
    Below a sample with STRING TYPE (It's assuming that the cursor return only one column of STRING type):
    try
      l_Statement = m_Connection->createStatement("BEGIN :1 := PACKAGE1.GetCursor1(:2); END;");
      l_Statement->registerOutParam(1, oracle::occi::OCCINUMBER, sizeof(l_CodeErreur));
      l_Statement->registerOutParam(2, oracle::occi::OCCICURSOR);
      l_Statement->executeQuery();
      l_CodeErreur = l_Statement->getNumber(1);
      if ((int) l_CodeErreur     == 0)
        char                         l_ArrayName[5][256];
        ub2                          l_ArrayNameSize[5];
        l_ResultSet  = l_Statement->getCursor(2);
        l_ResultSet->setDataBuffer(1, l_ArrayName,   OCCI_SQLT_STR, sizeof(l_ArrayName[0]),   l_ArrayNameSize,   NULL, NULL);
        while (l_ResultSet->next(5))
          for (int i = 0; i < l_ResultSet->getNumArrayRows(); i++)
            l_Name = CString(l_ArrayName);
    l_Statement->closeResultSet(l_ResultSet);
    m_Connection->terminateStatement(l_Statement);
    catch (SQLException &p_SQLException)
    I hope that sample help you.
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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.

  • Oracle Function returns a Ref Cursor to a ResultSet object - Performance

    My program calls an Oracle PL/SQL function which returns a ref cursor to a ResultSet object. I know that the function runs to completion relatively quickly when i run it in an anonymous block but when the call is made through my Java application the resultset takes about 30 mins to return. Below is a snippet of my code:
    currentConnection = ConnectionManager.getInstance().getConnection();
    reportStmt = currentConnection.prepareCall("BEGIN ? := ENVISION.PKG_WMS_TO_AP.F_REPORT_CI_SC_HOLDING(?,?); END;"); reportStmt.registerOutParameter(1, OracleTypes.CURSOR);
    reportStmt.setString(2, invoice.getCrewHQ());
    reportStmt.setDate(3, invoice.getWrCompletionDate());
    reportStmt.execute();
    reportRS = ((OracleCallableStatement) reportStmt).getCursor(1);
    Through a debugger I see that the second last statement (reportStmt.execute()) runs quickly. It is only when I step into the last statement that the debugger takes up to 30 minutes.
    Any thoughts?

    Flynn,
    The Internet is a dynamic place. After nearly two and a half years, there is a chance that a link will change. This is the new URL for the relevant Web page:
    http://asktom.oracle.com/~tkyte/ResultSets/
    Good Luck,
    Avi.

  • [Solved] 27.8.4 How to Create a VO on a REF CURSOR - Missing first row

    Searching the forum I found: BC4J - Get one less row from view object.
    Dive into BC4J related  --REF CURSOR (Resultset)
    The first message did not have any answers, and the second had a follow up question - still no answers though - and I thought I would try a different title.
    (This is off topic, but it would be a great help if the search results also displayed the number of replys in the thread. That way, I wouldn't have to view the messages that don't have responses.)
    (This will be deployed on a server that has the ADF for JDeveloper 10.1.2 installed, so using that version of JDeveloper to develop the app.)
    Okay, back to the problem ==>
    I created a VO from a ref cursor, using the manual as a guide. When I run a page that displays a read only table of the view object, I am missing the first row. (Always the first row!) I don't have any order set, and if I call the ref cursor in a Java program for testing, I see all rows and the count is correct.
    One other point, when I call the page, I get the following validation error:
    Validation Error
    You must correct the following error(s) before proceeding:
    * JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=null
    * null
    I still see the table, it is just missing the first row of data.
    In my form I have first, previous set, next set , and last
    navigation buttons. If I press last then first, the error goes away. I still don't see the missing row though.
    Any guidance would be appreciated! I can post my code, but it is pretty much the same code in the AdvancedViewObjectExamples.zip in the ViewObjectOnRefCursor example. I just substituted my two package calls (getRefCursor and getRefCursorCount).
    Thanks, Ken

    Went back to a backup copy of the source. Fixed the error. Now I'm back to just not being able to see the first row of data.
    Additional Note: I had removed fields in the display. Once I truncated the ps_txn table in the schema defined by the model, the data would display (Still without the first record.)
    Are there any examples that are more in depth than the few pages in the developer guide?
    Here is the code for my VOImpl class:
    package newslinearchive.model.datamodel;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.sql.Types;
    import oracle.jbo.InvalidParamException;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.QueryCollection;
    import oracle.jbo.server.SQLBuilder;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    // --- File generated by Oracle ADF Business Components Design Time.
    // --- Custom code may be added to this class.
    // --- Warning: Do not modify method signatures of generated methods.
    public class SearchRefCursorImpl extends ViewObjectImpl {
    * This is the default constructor (do not remove)
    public SearchRefCursorImpl() {
    * Overridden framework method.
    * Executed when the framework needs to issue the database query for
    * the query collection based on this view object. One view object
    * can produce many related result sets, each potentially the result
    * of different bind variable values. If the rowset in query is involved
    * in a framework-coordinated master/detail viewlink, then the params array
    * will contain one or more framework-supplied bind parameters. If there
    * are any user-supplied bind parameter values, they will PRECEED the
    * framework-supplied bind variable values in the params array, and the
    * number of user parameters will be indicated by the value of the
    * numUserParams argument.
    protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
    storeNewResultSet(qc,retrieveRefCursor(qc,params));
    super.executeQueryForCollection(qc, params, numUserParams);
    * Overridden framework method.
    * Wipe out all traces of a built-in query for this VO
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    * Overridden framework method.
    * The role of this method is to "fetch", populate, and return a single row
    * from the datasource by calling createNewRowForCollection() and populating
    * its attributes using populateAttributeForRow().
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
    * We ignore the JDBC ResultSet passed by the framework (null anyway) and
    * use the resultset that we've stored in the query-collection-private
    * user data storage
    rs = getResultSet(qc);
    * Create a new row to populate
    ViewRowImpl r = createNewRowForCollection(qc);
    try {
    * Populate new row by attribute slot number for current row in Result Set
    // populateAttributeForRow(r,0, rs.getLong(1));
    // populateAttributeForRow(r,1, rs.getString(2));
    // populateAttributeForRow(r,2, rs.getString(3));
    // MASTERID NOT NULL NUMBER
    populateAttributeForRow(r,0, rs.getBigDecimal(1));
    //ID NOT NULL NUMBER
    populateAttributeForRow(r,1, rs.getBigDecimal(2));
    // CAID NOT NULL NUMBER
    populateAttributeForRow(r,2, rs.getBigDecimal(3));
    // LANGUAGE NOT NULL VARCHAR2(30)
    populateAttributeForRow(r,3, rs.getString(4));
    // IS_CURRENT_VERSION NOT NULL NUMBER(1)
    populateAttributeForRow(r,4, rs.getBigDecimal(5));
    // FOLDER_ID NOT NULL NUMBER
    populateAttributeForRow(r,5, rs.getBigDecimal(6));
    // FOLDER_REGION_ID NOT NULL NUMBER
    populateAttributeForRow(r,6, rs.getBigDecimal(7));
    // NAME NOT NULL VARCHAR2(256)
    populateAttributeForRow(r,7, rs.getString(8));
    // DISPLAY_NAME VARCHAR2(256)
    populateAttributeForRow(r,8, rs.getString(9));
    // ITEMTYPE NOT NULL VARCHAR2(30)
    populateAttributeForRow(r,9, rs.getString(10));
    // SUBTYPE VARCHAR2(40)
    populateAttributeForRow(r,10, rs.getString(11));
    // SUBTYPE_CAID NUMBER
    populateAttributeForRow(r,11, rs.getBigDecimal(12));
    // PARENT_ITEM_ID NUMBER
    populateAttributeForRow(r,12, rs.getBigDecimal(13));
    // CATEGORY_ID NUMBER
    populateAttributeForRow(r,13, rs.getBigDecimal(14));
    // CATEGORY_CAID NUMBER
    populateAttributeForRow(r,14, rs.getBigDecimal(15));
    // AUTHOR VARCHAR2(50)
    populateAttributeForRow(r,15, rs.getString(16));
    // DESCRIPTION VARCHAR2(2000)
    populateAttributeForRow(r,16, rs.getString(17));
    // PUBLISH_DATE NOT NULL DATE
    populateAttributeForRow(r,17, rs.getDate(18));
    // EXPIREMODE VARCHAR2(90)
    populateAttributeForRow(r,18, rs.getString(19));
    // EXPIRENUMBER NUMBER
    populateAttributeForRow(r,19, rs.getBigDecimal(20));
    // EXPIREDATE DATE
    populateAttributeForRow(r,20, rs.getDate(21));
    // IMAGE VARCHAR2(350)
    populateAttributeForRow(r,21, rs.getString(22));
    // KEYWORDS VARCHAR2(2000)
    populateAttributeForRow(r,22, rs.getString(23));
    // URL VARCHAR2(4000)
    populateAttributeForRow(r,23, rs.getString(24));
    // FILENAME VARCHAR2(350)
    populateAttributeForRow(r,24, rs.getString(25));
    // TEXT CLOB()
    populateAttributeForRow(r,25, rs.getClob(26));
    // FOLDER_LINK_ID NUMBER
    populateAttributeForRow(r,26, rs.getBigDecimal(27));
    // FOLDER_LINK_CAID NUMBER
    populateAttributeForRow(r,27, rs.getBigDecimal(28));
    // ACTIVE NOT NULL NUMBER(1)
    populateAttributeForRow(r,28, rs.getBigDecimal(29));
    // CAN_BE_CHECKEDOUT NUMBER(1)
    populateAttributeForRow(r,29, rs.getBigDecimal(30));
    // IS_ITEM_CHECKEDOUT NUMBER(1)
    populateAttributeForRow(r,30, rs.getBigDecimal(31));
    // CHECKER_USERNAME VARCHAR2(256)
    populateAttributeForRow(r,31, rs.getString(32));
    // CHECKOUT_DATE DATE
    populateAttributeForRow(r,32, rs.getDate(33));
    // FULLSCREEN NOT NULL NUMBER(1)
    populateAttributeForRow(r,33, rs.getBigDecimal(34));
    // INPLACE NOT NULL NUMBER(1)
    populateAttributeForRow(r,34, rs.getBigDecimal(35));
    // CREATEDATE NOT NULL DATE
    populateAttributeForRow(r,35, rs.getDate(36));
    // CREATOR NOT NULL VARCHAR2(256)
    populateAttributeForRow(r,36, rs.getString(37));
    // UPDATEDATE DATE
    populateAttributeForRow(r,37, rs.getDate(38));
    // UPDATOR VARCHAR2(256)
    populateAttributeForRow(r,38, rs.getString(39));
    // SECURITY VARCHAR2(25)
    populateAttributeForRow(r,39, rs.getString(40));
    // VISIBLE NOT NULL NUMBER(1)
    populateAttributeForRow(r,40, rs.getBigDecimal(41));
    // SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,41, rs.getBigDecimal(42));
    // CATEGORY_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,42, rs.getBigDecimal(43));
    // AUTHOR_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,43, rs.getBigDecimal(44));
    // CREATE_DATE_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,44, rs.getBigDecimal(45));
    // ITEMTYPE_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,45, rs.getBigDecimal(46));
    catch (SQLException s) {
    throw new JboException(s);
    return r;
    * Overridden framework method.
    * Return true if the datasource has at least one more record to fetch.
    protected boolean hasNextForCollection(Object qc) {
    ResultSet rs = getResultSet(qc);
    boolean nextOne = false;
    try {
    nextOne = rs.next();
    * When were at the end of the result set, mark the query collection
    * as "FetchComplete".
    if (!nextOne) {
    setFetchCompleteForCollection(qc, true);
    * Close the result set, we're done with it
    rs.close();
    catch (SQLException s) {
    throw new JboException(s);
    return nextOne;
    * Overridden framework method.
    * The framework gives us a chance to clean up any resources related
    * to the datasource when a query collection is done being used.
    protected void releaseUserDataForCollection(Object qc, Object rs) {
    * Ignore the ResultSet passed in since we've created our own.
    * Fetch the ResultSet from the User-Data context instead
    ResultSet userDataRS = getResultSet(qc);
    if (userDataRS != null) {
    try {
    userDataRS.close();
    catch (SQLException s) {
    /* Ignore */
    super.releaseUserDataForCollection(qc, rs);
    * Overridden framework method
    * Return the number of rows that would be returned by executing
    * the query implied by the datasource. This gives the developer a
    * chance to perform a fast count of the rows that would be retrieved
    * if all rows were fetched from the database. In the default implementation
    * the framework will perform a SELECT COUNT(*) FROM (...) wrapper query
    * to let the database return the count. This count might only be an estimate
    * depending on how resource-intensive it would be to actually count the rows.
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    Long result = (Long)callStoredFunction(NUMBER,
    "PORTAL.SEARCH_REFCURSOR.getRefCursorCount",
    viewRowSet.getParameters(true));
    return result.longValue();
    // ------------- PRIVATE METHODS ----------------
    * Return a JDBC ResultSet representing the REF CURSOR return
    * value from our stored package function.
    * new Object[]{getNamedBindParamValue("Email",params)}
    private ResultSet retrieveRefCursor(Object qc, Object[] params) {
    ResultSet rs = (ResultSet)callStoredFunction(OracleTypes.CURSOR,
    "PORTAL.SEARCH_REFCURSOR.getRefCursor",
    null);
    return rs ;
    private Object getNamedBindParamValue(String varName, Object[] params) {
    Object result = null;
    if (getBindingStyle() == SQLBuilder.BINDING_STYLE_ORACLE_NAME) {
    if (params != null) {
    for (Object param : params) {
    Object[] nameValue = (Object[])param;
    String name = (String)nameValue[0];
    if (name.equals(varName)) {
    return (String)nameValue[1];
    throw new JboException("No bind variable named '"+varName+"'");
    * Store a new result set in the query-collection-private user-data context
    private void storeNewResultSet(Object qc, ResultSet rs) {
    ResultSet existingRs = getResultSet(qc);
    // If this query collection is getting reused, close out any previous rowset
    if (existingRs != null) {
    try {existingRs.close();} catch (SQLException s) {}
    setUserDataForCollection(qc,rs);
    hasNextForCollection(qc); // Prime the pump with the first row.
    * Retrieve the result set wrapper from the query-collection user-data
    private ResultSet getResultSet(Object qc) {
    return (ResultSet)getUserDataForCollection(qc);
    * Return either null or a new oracle.jbo.domain.Date
    private static Date nullOrNewDate(Timestamp t) {
    return t != null ? new Date(t) : null;
    * Return either null or a new oracle.jbo.domain.Number
    private static Number nullOrNewNumber(BigDecimal b) {
    try {
    return b != null ? new Number(b) : null;
    catch (SQLException s) { }
    return null;
    //----------------[ Begin Helper Code ]------------------------------
    public static int NUMBER = Types.NUMERIC;
    public static int DATE = Types.DATE;
    public static int VARCHAR2 = Types.VARCHAR;
    public static int CLOB = Types.CLOB;
    * Simplifies calling a stored function with bind variables
    * You can use the NUMBER, DATE, and VARCHAR2 constants in this
    * class to indicate the function return type for these three common types,
    * otherwise use one of the JDBC types in the java.sql.Types class.
    * NOTE: If you want to invoke a stored procedure without any bind variables
    * ==== then you can just use the basic getDBTransaction().executeCommand()
    * @param sqlReturnType JDBC datatype constant of function return value
    * @param stmt stored function statement
    * @param bindVars Object array of parameters
    * @return function return value as an Object
    protected Object callStoredFunction(int sqlReturnType, String stmt,
    Object[] bindVars) {
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement("begin ? := " + stmt +
    "; end;", 0);
    st.registerOutParameter(1, sqlReturnType);
    if (bindVars != null) {
    for (int z = 0; z < bindVars.length; z++) {
    st.setObject(z + 2, bindVars[z]);
    st.executeUpdate();
    return st.getObject(1);
    catch (SQLException e) {
    throw new JboException(e);
    finally {
    if (st != null) {
    try {
    st.close();
    catch (SQLException e) {}
    /**Gets the bind variable value for Email
    public String getEmail() {
    return (String)getNamedWhereClauseParam("Email");
    /**Sets <code>value</code> for bind variable Email
    public void setEmail(String value) {
    setNamedWhereClauseParam("Email", value);
    /**getEstimatedRowCount - overridden for custom java data source support.
    public long getEstimatedRowCount() {
    long value = super.getEstimatedRowCount();
    return value;
    Thanks, Ken

  • Problem declaring and using a REF CURSOR

    I'm having a real problem using a REF CURSOR type
    Here's the DECLARE and the start of the BEGIN I've so far developed.
    DECLARE
    TYPE r1 IS RECORD (
    szvcapc_pidm szvcapc.szvcapc_pidm%TYPE,
    szvcapc_term_code szvcapc.szvcapc_term_code%TYPE,
    szvcapc_request_no szvcapc.szvcapc_request_no%TYPE);
    szvcapc_rec r1;
    TYPE cursor_1 IS REF CURSOR RETURN r1;
    szvcapc_cv cursor_1;
    TYPE r2 IS RECORD (
    stvests_code stvests.stvests_code%TYPE
    stvests_rec r2;
    TYPE cursor_2 IS REF CURSOR RETURN stvests_rec;
    stvests_cv cursor_2;
    BEGIN
    OPEN szvcapc_cv FOR
    SELECT szvcapc_pidm, szvcapc_term_code, szvcapc_request_no
    FROM szvcapc
    WHERE szvcapc_passed_ind = 'Y'
    AND szvcapc_award_credits = 'N';
    LOOP
    FETCH szvcapc_cv INTO szvcapc_rec;
    EXIT WHEN szvcapc_cv%NOTFOUND;
    END LOOP;
    OPEN stvests_cv FOR
    SELECT stvests_code
    FROM stvests
    WHERE stvests_eff_headcount = 'Y';
    LOOP
    FETCH stvests_cv INTO stvests_rec;
    EXIT WHEN stvests_cv%NOTFOUND;
    END LOOP;
    SELECT *
    FROM (
    <snip>
    INNER JOIN stvests_rec
    ON SFBETRM.SFBETRM_ESTS_CODE = stvests_rec.STVESTS_CODE
    <snip>
    I later try to use the stvests_rec and szvcapc_rec in the main SELECT statement it doesn't recognise stvests_rec and szvcapc_rec as a "Table or View".
    I have to use a REF CURSOR as this code is ultimately for use in Oracle Reports.
    What am I doing wrong?

    > The reason I'm trying to use a REF CURSOR is that I was told that you
    couldn't use CURSORs in Oracle Reports.
    That does not change anything ito what happens on the Oracle server side. A cursor is a cursor is a cursor.
    Every single SQL winds up as a cursor. Each cursor has a reference handle to access and use. HOW this handle is used in the language differs. But that is a language issue and not an Oracle RDBMS issue.
    For example. An EXECUTE IMMEDIATE in PL/SQL creates a cursor handle and destroys it after use - automatically. An implicit cursor works the same. An explicit cursor you have the handle fetch from it and close from it when done.
    A ref cursor is simply a handle that can be returned to an external client - allowing that application to use the handle to fetch the rows.
    Do not think that a ref cursor is any different from the RDBMS side than any other cursor. The RDBMS does not know the difference. Does not care and nor should it.
    > I'm trying to reduce the hits on the database from nested selects by
    removing the dataset from the main SELECT statement and performing it only
    once outside and then referencing this previously collected dataset inside the
    main SELECT statement.
    Good stuff that you are considering SQL performance. But you need to make sure that you
    a) identify the performance inhibitor issue correctly
    b) address this issue correctly
    And you need to do that within SQL. Not PL/SQL. PL/SQL will always be slower at crunching data than SQL. For example, wanting to cache the data somehow to reduce the read overhead - that is exactly what the DB buffer cache does. It caches data. That is also exactly what the CBO will attempt - reduce the amount of data that needs to be read and processed.
    Not saying that the RDBMS can do it all. It needs help from you - in the form of a SQL that instructs it to process only the minimum amount of data required to get the required results. In the form of a sound physical design that provides optimal usage of data storage and access (like indexing, partitioning, clustering, etc).
    Bottom line - you cannot use a REF CURSOR to make a SQL go faster. A REF CURSOR is simply a cursor in the SQL Engine. A cursor is nothing but the "compiled-and-executable" code of a SQL "source program".

  • Ref Cursor over Implicit and explicit cursors

    Hi,
    In my company when writing PL/SQL procedure, everyone uses "Ref Cursor",
    But the article below, says Implicit is best , then Explicit and finally Ref Cursor..
    [http://www.oracle-base.com/forums/viewtopic.php?f=2&t=10720]
    I am bit confused by this, can any one help me to understand this?
    Thanks

    SeshuGiri wrote:
    In my company when writing PL/SQL procedure, everyone uses "Ref Cursor",
    But the article below, says Implicit is best , then Explicit and finally Ref Cursor..
    [http://www.oracle-base.com/forums/viewtopic.php?f=2&t=10720]
    I am bit confused by this, can any one help me to understand this?There is performance and there is performance...
    To explain. There is only a single type of cursor in Oracle - that is the cursor that is parsed and compiled by the SQL engine and stored in the database's shared pool. The "+client+" is then given a handle (called a SQL Statement Handle in many APIs) that it can use to reference that cursor in the SQL engine.
    The performance of this cursor is not determined by the client. It is determined by the execution plan and how much executing that cursor cost ito server resources.
    The client can be Java, Visual Basic, .Net - or a PL/SQL program. This client language (a client of SQL), has its own structures in dealing with that cursor handle received from the SQL engine.
    It can hide it from the developer all together - so that he/she does not even see that there is a statement handle. This is what implicit cursors are in PL/SQL.
    It can allow the developer to manually define the cursor structure - this is what explicit cursors, ref cursors, and DBMS_SQL cursors are in PL/SQL.
    Each of these client cursor structures provides the programmer with a different set of features to deal with SQL cursor. Explicit cursor constructs in PL/SQL do not allow for the use of dynamic SQL. Ref cursors and DBMS_SQL cursors do. Ref cursors do not allow the programmer to determine, at run-time, the structure of the SQL projection of the cursor. DBMS_SQL cursors do.
    Only ref cursors can be created in PL/SQL and then be handed over to another client (e.g. Java/VB) for processing. Etc.
    So each of the client structures/interfaces provides you with a different feature set for SQL cursors.
    Choosing implicit cursors for example does not make the SQL cursor go faster. The SQL engine does not know and does not care, what client construct you are using to deal with the SQL cursor handle it gave you. It does not matter. It does not impact its SQL cursor performance.
    But on the client side, it can matter - as your code in dealing with that SQL cursor determines how fast your interaction with that SQL cursor is. How many context switches you make. How effectively you use and re-use the SQL (e.g. hard parsing vs soft parsing vs re-using the same cursor handle). Etc.
    Is there any single client cursor construct that is better? No.
    That is an ignorant view. The client language provides a toolbox, where each tool has a specific application. The knowledgeable developer will use the right tool for the job. The idiot developer will select one tool and use it as The Hammer to "solve" all the problems.

  • Problem with XSU when trying to execute pl/sql package returning ref cursor

    Hi,
    I'm exploring xsu with 8i database.
    I tried running sample program which I took from oracle
    documentation. Here is the details of these.
    ------create package returning ref cursor---
    CREATE OR REPLACE package testRef is
         Type empRef IS REF CURSOR;
         function testRefCur return empRef;
    End;
    CREATE OR REPLACE package body testRef is
    function testRefCur RETURN empREF is
    a empREF;
    begin
    OPEN a FOR select * from emp;
    return a;
    end;
    end;
    ---------package successfully created-----
    Now I use java program to generate xml data from ref cursor
    ------------java program ----------
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    import java.io.*;
    public class REFCURt
    public static void main(String[] argv)
    throws SQLException
    String str = null;
    Connection conn = getConnection("scott","tiger"); //
    create connection
    // Create a ResultSet object by calling the PL/SQL function
    CallableStatement stmt =
    conn.prepareCall("begin ? := testRef.testRefCur();
    end;");
    stmt.registerOutParameter(1,OracleTypes.CURSOR); // set
    the define type
    stmt.execute(); // Execute the statement.
    ResultSet rset = (ResultSet)stmt.getObject(1); // Get the
    ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset); //
    prepare Query class
         try
    qry.setRaiseNoRowsException(true);
    qry.setRaiseException(true);
    qry.keepCursorState(true); // set options (keep the
    cursor alive..
         System.out.println("..before printing...");
    while ((str = qry.getXMLString())!= null)
    System.out.println(str);
         catch(oracle.xml.sql.OracleXMLSQLNoRowsException ex)
    System.out.println(" END OF OUTPUT ");
    qry.close(); // close the query..!
    // qry.close(); // close the query..!
    // Note since we supplied the statement and resultset,
    closing the
    // OracleXMLquery instance will not close these. We would
    need to
    // explicitly close this ourselves..!
    stmt.close();
    conn.close();
    // Get the connection given the user name and password..!
    private static Connection getConnection(String user, String
    passwd)
    throws SQLException
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@xxxx:1521:yyyy",user,passwd);
    return conn;
    when I ran the program after successful compilation,I got the
    following error
    ==========
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException:
    1
    at oracle.xml.sql.core.OracleXMLConvert.getXML(Compiled
    Code)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:263)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:217)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:194)
    at REFCURt.main(Compiled Code)
    ============================
    Can anybody tell me why I'm getting this error.Am I missing any
    settings?
    thanks

    We are using 8.1.7 Oracle db with latest xdk loaded.
    am I missing any settings?

  • Server 2012 R2 slow performance over all

    This is a DELL PowerEdge R820 / 256GB RAM / 4TB onboard storage configured as Remote Desktop Services Host /TS... running QuickBooks, MS Office 2010 STD, Symantec EndPoint Protection (basic antivirus installation ONLY)... 1 month old server... SUPER fast,
    super powerfull.... Part of an AD in SBS 2008 Premium... single NIC card 4 ports / 3 ports disabled. single IP... no VLANS... server is able to resolve ANY pc, DNS record with no problems... able to resolve DC by name, able to receive GP, able to update, able
    to do everything that I can think of.... EXCEPT... anything I open, word, excel, QuickBooks, IE.... takes forever to open... after the application is open is fast but to open anything takes 3-4 minutes.... open ticket with Symantec all looks good, created
    lots of exceptions for antivirus/real time scanning, open ticket with QuickBooks: files look good application was removed and reinstalled to be sure all was done correctly... check the binding order for the disabled NIC; the active one is TOP option, no errors
    at all in event viewers for system, application, setup, no errors at all in DELL management tool, no hard drive errors, no controllers errors.... this server is replacing an old dell poweredge 2008 STD with 24GB RAM... the old DELL opens the same applications
    way faster than the new one... same Quicken version; old server opens Quicken in seconds, new one 3-4 minutes..... Real time monitoring NEVER goes above 1% for CPU and 3% for memory utilization.... one more thing... removed antivirus 100% restart... same performance
    without antivirus.....
    Any ideas will be great as of how to troubleshoot the slow performance....
    Thank you!

    Hi,
    As Sam suggested, please check if there any issue occurred in hard drive.
    On current situation, please also refer to following steps and troubleshoot, then check if we can find more
    clues.
    Please check if you have installed all necessary updates for the Windows Server 2012 R2.
    Please
    perform a clean boot to check if there has software conflicts.
    Please use Resource Monitor to troubleshoot and check if we can find some more details.
    Using Resource Monitor to Troubleshoot Windows Performance Issues Part 1
               Using
    Resource Monitor to Troubleshoot Windows Performance Issues Part 2
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

  • Slow Performance - Java Related?

    This is an old box that I bought used recently, but the system install is recent. The system performs very slowly - about 50% of the speed of comparable Mac's in the XBench database. If I use Xupport to manully run "All" of the system maintenance crons I get some improvement, but it quickly goes back to being slow.
    Looking at my logs I have a "boat load" of Java errors under CrashReporter; there will be a string of "JavaNativeCrash_pidXXX.log" entries - many of them, as follows:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : Bus Error occurred at PC=0x908611EC
    Function=[Unknown.]
    Library=/usr/lib/libobjc.A.dylib
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Many of the line entries that follow, but not all of them, refer to SargentD2OL, which is a Java app, which I installed, but it did not work properly so I removed it. Yet I continue to get Java errors that refer to this now non-existant app.
    I have read that Java apps use a lot of resources, and that D2OL in particular uses a lot of resources. Can my slow performance problem be Java related? If so, any idea of how I can fix this problem?
    G4 AGP Graphics   Mac OS X (10.3.9)   500 MHz, 512M RAM

    Sorry to take so long to respond, but other issues in life have demanded my attention.
    None of the solutions given have had any affect. My Java folder has both a 1.3.1 and a 1.4.2 app - the Java Update 2 will not reinstall because it sees an up-to-date app in the folder. But reading the update file it says the older Java will be removed - but it is still there. Problem?
    On XBench the system scores a 9 to 10, while similar boxes on the XBench database score around 18 to 20. My cpu, memory, and video scores are very low. The HD through-put scores are the only ones that are normal. TechTool Pro 4 finds no problems. I have removed the memory sticks one at a time and retested after each cycle - no difference.
    I have two drives, each with a 10.3.9 install. One works fine, scores around a 17 on XBench, the other scores a 9 to 10. So it appears to be a software problem. The slower install is a drive from a iMac G3 that has been moved to the G4 - are there issues with this?
    My favored drive is the prior G3 one (newer and faster than the other drive that system tests faster in XBench) - it has my profile and all my info on it. It worked fine in the G3 - no problems.
    Thanks for the help,
    G4 AGP Graphics Mac OS X (10.3.9) 500 MHz, 512M RAM, ATI 8500

  • Slow Performance Weeks after Encryption

    I encrypted my organization's laptops several weeks ago and did not return them to users until after I could tell by device performance that the bulk encrypting task had completed. I have two users that are experiencing extremely slow performance on their systems. When the users are typing anything like a Word document, upon each keystroke they see the Windows 7 "circle" icon at the mouse cursor. This seems to come and go several times over the week, and every few days we are getting a request to resolve the issue but after restarting the behavior may not act up anymore.
    I found a TID suggesting to change HKLM\SOFTWARE\Novell-FDE\Parameters\ThrottleEncryption to a lower level like Idle or BelowNormal. Is there anything else that I should also try? Thanks!

    Yes, but nothing from Novell yet - I will keep pushing them forward and let you know if I get some results.
    -j-
    >>> Jim Koerner<[email protected]> 8.3.2013 15:29 >>>
    Sounds like you have a SR going on this also. Have you heard anything on a
    fix? Mine has been stagnant for a while and I just bumped it to see if
    anything has been figured out or if more info is needed from my side. Hope
    to here something soon. This is a pretty severe problem especially when it
    happens multiple times to a machine.
    Jim Koerner
    Server - ZCM 11.2.2 MU1 and Internal Database on Win2008R2x64
    Client - ZCM 11.2.2 MU1 on Win7SP1x64 and WinXPx32
    "Jouko Oksanen" <Jouko.Oksanen_re@move_efore.fi> wrote in message
    news:513713E9.13C8.00F6.0@move_efore.fi...
    Hi,
    We have had (maybe) similar issues with our FDE setup that FDE policy
    assigned devices tend to loose the policy and start to do disk decryption
    and suddenly get once again the policy back and start to encrypt again. This
    could be found from "ZCM agent, Full disk encryption, about, Agents status,
    Settings, on section "Emergency Recovery Information" you could see events
    'Zone Changed' what according to Novell support meant that the policy was
    "re-initialized / changed" even our policy counter have not changed = policy
    got lost in some phase.
    We are now suspecting that there is some issues with the policy service that
    plays tricks on us.
    -j-
    >>> Jim Koerner<[email protected]> 20.2.2013 19:57
    >>> >>>
    In ZCC on the devices that you are having issues with look at the Emergency
    Recovery tab and see if you have multiple listings in here that corresponds
    to the slowness. If so your devices are decrypting and then re-encrypting.
    Your mention of being asked to reboot leads me to believe that is what is
    happening to you.
    I have had a few SRs going on this one for a while and it got bumped to
    backend but no info in a month or so.
    Jim Koerner
    Server - ZCM 11.2.2 MU1 and Internal Database on Win2008R2x64
    Client - ZCM 11.2.2 MU1 on Win7SP1x64 and WinXPx32
    "marklar23" wrote in message
    news:[email protected]...
    I encrypted my organization's laptops several weeks ago and did not
    return them to users until after I could tell by device performance that
    the bulk encrypting task had completed. I have two users that are
    experiencing extremely slow performance on their systems. When the
    users are typing anything like a Word document, upon each keystroke they
    see the Windows 7 "circle" icon at the mouse cursor. This seems to come
    and go several times over the week, and every few days we are getting a
    request to resolve the issue but after restarting the behavior may not
    act up anymore.
    I found a TID suggesting to change
    HKLM\SOFTWARE\Novell-FDE\Parameters\ThrottleEncryption to a lower level
    like Idle or BelowNormal. Is there anything else that I should also
    try? Thanks!
    marklar23
    marklar23's Profile: http://forums.novell.com/member.php?userid=5123
    View this thread: http://forums.novell.com/showthread.php?t=464262

  • Error while working with ref cursor

    Hi I tried the following but getting the err
    DECLARE
    TYPE ref_nm IS REF CURSOR;
    vref REF_NM;
    vemp emp%rowtype;
    BEGIN
    OPEN vref FOR SELECT ename ,sal FROM EMP;
    LOOP
      FETCH vref INTO vemp;
      EXIT WHEN vref%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE ( vemp.ename ||','||vemp.sal );
    END LOOP;
      CLOSE vref;
    END;Error is
    ORA-06504: PL/SQL: Return types of Result Set variables or query do not match

    Syntactically correct - but a horrible approach performance wise if you only need specific columns.
    The basic problem here is using the wrong tool. A ref cursor. Why? There's no reason in this code for using a ref cursor. Using a standard cursor data type addresses the requirement a lot better.
    As you can define the cursor:
    cursor myCursor is select c1, c2 from tab1;
    You can define an array data type for fetching that cursors data - and thus definition does not need to be touched when you change the cursor itself to include/exclude columns:
    type TMyCursorBuffer is table of myCursor%RowType;
    And finally you can define a bulk collection buffer for bulk processing the output of the cursor:
    myBuffer TMyCursorBuffer;

  • How to update data returned using REF CURSOR

    Hi all,
    I am trying to update updated data in a gridview but the update button seem to do nothing as i retrieve data using REF CURSOR.
    Let me describe the architecture of my application first. I'm trying to implement best practice whenever possible. I am following the data access tutorial published in www.asp.net , the only difference is that i have an Oracle (10g) database. So I split my application into three layers, data access, business logic, and presentation layer. I'm also writing all queries in an Oracle package.
    So I have my Oracle packages that perform CRUD operations. Then I have an xsd file that define dataTable based on the package procedure. My business logic layer then calls functions defined in the xsd file. And finally a detailsView control that uses an ObjectDataSource to call business logic functions.
    In a nutshell, I am just trying to update records retrieved using REF CURSOR. Your help is very much appreciated. Please let me know if further details are required. Cheers,

    In the DataSet (xsd) where your DataTable is defined, you just need to add additional methods to the TableAdapter to handle insert, update and delete, either with SQL or by mapping to stored procedures.
    Alternatively in code, create an OracleDataAdapter and supply its InsertCommand, UpdateCommand and DeleteCommand.
    David

  • Ref Cursors / throwing data into a Ref Cursor as data is fetched

    I was wondering if anyone has executed an SQL statement and as each row is being fetched back from an SQL, doing some data checks and processing to see if the row is valid to return or not, based on the values being fetched in an SQL.
    For example, I'm taking an SQL statement and trying to do some tuning. I have an Exists clause in the Where statement that has a nested sub-query with some parameters passed in. I am attempting to move that statement to a function call in a package (which is called in the SELECT statement). As I fetch each row back, I want to check some values that are Selected and if the values are met, then, I want to execute the function to see if the data exists. If it does exist, then, I want the fetched row returned in the Ref Cursor. If the criteria is met and the row doesn't exist in the function call, then, I don't want the fetched row to return.
    Right now, the data has to be thrown to REF Cursor because it's being outputted to the Java application as a Result Set.
    I've found many statements where you can take a SELECT statement and throw the Results in the Ref Cursor. But, I want to go a step further and before I throw each row in the Ref Cursor, I want to some processing to see if I put the Fetched Row in the Ref Cursor.
    If someone has a better idea to accomplish this, I'm all ears. Like I say, I'm doing this method only for the sake of doing some database tuning and I think this will speed things up. Having the EXISTS clause works and it runs fast from an End-user standpoint but, when it processes on the database with the nested subquery, it is slow.
    Here's an example of something that might be a problem (Notice the nested subquery). I moved the nested subquery to a function call written on the database package and make the call to the procedure/package in the SELECT statement. As I process each row, I want to check some values prior having the function call execute. If it meet some criteria, then the record is Ok to fetch and display in the Ref Cursor. If it does not meet the criteria and goes through the function and doesn't return data, then, I don't want the Fetched row from the main query to return the data.:
    SELECT EMPNO,
    FIRST_NAME,
    LAST_NAME
    FROM EMP E,
    DEPT D
    WHERE E.DEPTNO = D.DEPTNO
    AND EXISTS (SELECT 'X'
    FROM MANAGER M
    WHERE M.MANAGER_ID = E.MANAGER_ID
    AND MANAGER_TYPE IN (SELECT MANAGER_TYPE
    FROM MANAGER_LOOKUP ML WHERE ML.MANAGER_TYPE = M.MANAGER_TYPE))
    Any help or ideas of other things to try is appreciated. Keep in mind that I am returning this data to the Java application so, throwing the data to a Ref Cursor in the PL/SQL is the ideal method.
    Chris

    Ref cursors are not required nor desirable when writing java database application. Cursors are mentioned only once in the JDBC documentation reference guide, in the section "Memory Leaks and Running Out of Cursors".
    In a word cursors are just plain ridiculous, and in fact I never used them in my 15+ years of application development practice:
    http://vadimtropashko.wordpress.com/cursors/

Maybe you are looking for

  • IMac 20" can be use also only as monitor?

    Hallo, i'm interested to know if the new iMac 20" can be used also only as monitor, i mean if can be connected an PC with windows XP to the iMac. From the Technical Specifications page i couldn't understad, sure that is possible to connect another mo

  • Black ink not printing

    My HP deskjet which is 2 months out of warranty, which i have recently bought new HP cartridges for, now won't print black (other colors are all fine). If have spent hours and hours trying to fix this, following all the advice on this forum - believe

  • FILE TO IDOC  SCENARIO WITH SCREEN SHOTS

    can u please send me  FILE TO IDOC  SCENARIO WITH SCREEN SHOTS and do the needful for me

  • Buffer hit ratio (to be negative)

    Hi All, My DB Version: 10.2.0 OS: Windows Server 2003 When i am checking snapshots at peak time and comparing it with one when there is no load on the server the buffer hit ratio (to be negative), the buffer cache is too small and the data in is bein

  • [solved] xdg-open url.jpg opens it in firefox

    Hello, I'm working on xfce. While clicking in psi IM to a http://....image.jpg link, the image gets opened in a new card of Firefox. Firefox is my default browser. In terminal xdg-open http://upload.koci.net.pl/uploads/crusader.jpg does the same. I w