CPU bound and distinct select tuning (10g)

Hi,
I think that my database is CPU bound :
Top 5 Timed Events Avg %Total
~~~~~~~~~~~~~~~~~~ wait Call
Event Waits Time (s) (ms) Time
CPU time 662 71.8
db file sequential read 11,082 66 6 7.2
control file sequential read 51,677 41 1 4.4
db file scattered read 8,133 39 5 4.3
SQL*Net more data to client 113,379 32 0 3.5
================
==================
And such stmt's probably cause this issue :
SQL ordered by CPU
CPU CPU per Elapsd Old
Time (s) Executions Exec (s) %Total Time (s) Buffer Gets Hash Value
101.49 160 0.63 15.9 102.55 252,160 2426247326
Module: dirdld.exe
SELECT DISTINCT(APPNM) FROM APPLICATION ORDER BY APPNM
===============================================
(SQL ordered by Gets)
Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value
713,149 33,280 21.4 13.3 39.67 42.70 2402103054
Module: ORACLE.EXE
INSERT INTO "PARAMETER" ("FAMNM","APPNM","PARTID","PARNAMELOC",
"DLDTYPE","VALUE","FLAG","SEQINFO") VALUES (:B8,:B7,:B6,TRIM(:B5
),:B4,TRIM(:B3),:B2,:B1)
489,906 114 4,297.4 9.1 20.16 29.46 2145980626
Module: ORACLE.EXE
DELETE FROM "PARAMETER" "A1" WHERE "A1"."PARTID"=:B1
============================
============================
So is there any possiblility to tune this query ? :
(it is already in keep buffer)
SELECT DISTINCT(APPNM) FROM APPLICATION ORDER BY APPNM
Plan
SELECT STATEMENT ALL_ROWSCost: 1,008 Bytes: 859,080 Cardinality: 85,908
3 SORT ORDER BY Cost: 1,008 Bytes: 859,080 Cardinality: 85,908
2 HASH UNIQUE Cost: 659 Bytes: 859,080 Cardinality: 85,908
1 TABLE ACCESS FULL TABLE VCESERVICE.APPLICATION Cost: 307 Bytes: 869,150 Cardinality: 86,915
Best Regards Arkadiusz Masny

Hi,
Thank's Joe.
But this query is hardcoded into application logic (standalone application).
Is it possible to force oracle (application) to use materialized view instead of table ?
Best Regards Arek Masny

Similar Messages

  • Spatial Queries are CPU bound and show very heavy use of query buffers

    Hi,
    Spatial Queries:
    When using tkprof to analyse spatial queries it is clear that
    there are implicit queries being done by Oracle spatial which
    use vast amounts of buffers, and seem unable to cache basic
    information from query to query - thus resulting in our machine
    being CPU bound when stress testing Oracle Spatial, for example
    the example below shows how information which is fixed for a
    table and not likely to change very often is being retrieved
    inefficiently (note the 26729 query buffers being used to do 6
    executions of what should be immediately available!!!):
    TKPROF: Release 8.1.7.0.0 - Production on Tue Oct 16 09:43:38
    2001
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    SELECT ATTR_NO, ATTR_NAME, ATTR_TYPE_NAME, ATTR_TYPE_OWNER
    FROM
    ALL_TYPE_ATTRS WHERE OWNER = :1 AND TYPE_NAME = :2 ORDER BY
    ATTR_NO
    call count cpu elapsed disk query rows
    Parse 6 0.00 0.01 0 0 0
    Execute 6 0.00 0.01 0 0 0
    Fetch 6 0.23 0.41 0 26729 5
    total 18 0.23 0.43 0 26729 5
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 37 (NAGYE)
    Rows Row Source Operation
    0 SORT ORDER BY
    0 FILTER
    1 NESTED LOOPS
    1 NESTED LOOPS
    290 NESTED LOOPS
    290 NESTED LOOPS
    290 NESTED LOOPS
    290 NESTED LOOPS
    290 TABLE ACCESS FULL ATTRIBUTE$
    578 TABLE ACCESS CLUSTER TYPE$
    578 TABLE ACCESS CLUSTER TYPE$
    578 INDEX UNIQUE SCAN (object id 255)
    578 TABLE ACCESS BY INDEX ROWID OBJ$
    578 INDEX RANGE SCAN (object id 35)
    578 TABLE ACCESS CLUSTER USER$
    578 INDEX UNIQUE SCAN (object id 11)
    289 TABLE ACCESS BY INDEX ROWID OBJ$
    578 INDEX RANGE SCAN (object id 35)
    0 TABLE ACCESS CLUSTER USER$
    0 INDEX UNIQUE SCAN (object id 11)
    0 FIXED TABLE FULL X$KZSPR
    0 NESTED LOOPS
    0 FIXED TABLE FULL X$KZSRO
    0 INDEX RANGE SCAN (object id 101)
    error during parse of EXPLAIN PLAN statement
    ORA-01039: insufficient privileges on underlying objects of the
    view
    and again:
    SELECT diminfo, nvl(srid,0)
    FROM
    ALL_SDO_GEOM_METADATA WHERE OWNER = 'NAGYE' AND TABLE_NAME =
    NLS_UPPER('TILE_MED_LINES_MBR') AND '"'||COLUMN_NAME||'"'
    = '"GEOM"'
    call count cpu elapsed disk query
    current rows
    Parse 20 0.00 0.04 0
    0 0 0
    Execute 20 0.00 0.00 0
    0 0 0
    Fetch 20 0.50 0.50 0 5960
    100 20
    total 60 0.50 0.54 0 5960
    100 20
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 37 (NAGYE) (recursive depth: 1)
    Rows Row Source Operation
    1 FILTER
    2 TABLE ACCESS BY INDEX ROWID SDO_GEOM_METADATA_TABLE
    2 INDEX RANGE SCAN (object id 24672)
    1 UNION-ALL
    1 FILTER
    1 NESTED LOOPS
    1 NESTED LOOPS
    1 NESTED LOOPS OUTER
    1 NESTED LOOPS OUTER
    1 NESTED LOOPS OUTER
    1 NESTED LOOPS OUTER
    1 NESTED LOOPS
    1 TABLE ACCESS FULL OBJ$
    1 TABLE ACCESS CLUSTER TAB$
    1 INDEX UNIQUE SCAN (object id 3)
    0 TABLE ACCESS BY INDEX ROWID OBJ$
    1 INDEX UNIQUE SCAN (object id 33)
    0 INDEX UNIQUE SCAN (object id 33)
    0 TABLE ACCESS CLUSTER USER$
    1 INDEX UNIQUE SCAN (object id 11)
    1 TABLE ACCESS CLUSTER SEG$
    1 INDEX UNIQUE SCAN (object id 9)
    1 TABLE ACCESS CLUSTER TS$
    1 INDEX UNIQUE SCAN (object id 7)
    1 TABLE ACCESS CLUSTER USER$
    1 INDEX UNIQUE SCAN (object id 11)
    0 FILTER
    0 NESTED LOOPS
    0 NESTED LOOPS OUTER
    0 NESTED LOOPS
    0 TABLE ACCESS FULL USER$
    0 TABLE ACCESS BY INDEX ROWID OBJ$
    0 INDEX RANGE SCAN (object id 34)
    0 INDEX UNIQUE SCAN (object id 97)
    0 INDEX UNIQUE SCAN (object id 96)
    0 FIXED TABLE FULL X$KZSPR
    0 NESTED LOOPS
    0 FIXED TABLE FULL X$KZSRO
    0 INDEX RANGE SCAN (object id 101)
    0 FIXED TABLE FULL X$KZSPR
    0 NESTED LOOPS
    0 FIXED TABLE FULL X$KZSRO
    0 INDEX RANGE SCAN (object id 101)
    error during parse of EXPLAIN PLAN statement
    ORA-01039: insufficient privileges on underlying objects of the
    view
    Note: The actual query being performed is:
    select a.id, a.geom
    from
    tile_med_lines_mbr a where sdo_relate(a.geom,mdsys.sdo_geometry
    (2003,NULL,
    NULL,mdsys.sdo_elem_info_array
    (1,1003,3),mdsys.sdo_ordinate_array(151.21121,
    -33.86325,151.21132,-33.863136)), 'mask=anyinteract
    querytype=WINDOW') =
    'TRUE'
    call count cpu elapsed disk query
    current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.08 0.08 0 4 0 0
    Fetch 5 1.62 21.70 0 56 0 827
    total 7 1.70 21.78 0 60 0 827
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: 37 (NAGYE)
    Rows Row Source Operation
    827 TABLE ACCESS BY INDEX ROWID TILE_MED_LINES_MBR
    828 DOMAIN INDEX
    Rows Execution Plan
    0 SELECT STATEMENT GOAL: CHOOSE
    827 TABLE ACCESS GOAL: ANALYZED (BY INDEX ROWID) OF
    'TILE_MED_LINES_MBR'
    828 DOMAIN INDEX OF 'TILE_MLINES_SPIND'
    CPU: none, I/O: none
    call count cpu elapsed disk query
    current rows
    Parse 1 0.00 0.00 0 92
    Execute 1 0.00 0.00 0 22
    Fetch 1 0.00 0.00 38 236
    total 3 0.00 0.00 38 350
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 37 (NAGYE)
    Rows Row Source Operation
    12 TABLE ACCESS BY INDEX ROWID ROADELEMENT_MBR
    178 DOMAIN INDEX
    Rows Execution Plan
    0 SELECT STATEMENT GOAL: CHOOSE
    12 TABLE ACCESS GOAL: ANALYZED (BY INDEX ROWID) OF
    'ROADELEMENT_MBR'
    178 DOMAIN INDEX OF 'RE_MBR_SPIND'
    CPU: none, I/O: none
    Can Oracle improve the performance of Oracle spatial by
    improving the implementation so as to perform alternative
    implicit queries so as not to use these vast amounts of memory?
    Cheers
    Alex Eadie

    Hi Ravi,
    Thankyou for your reply.
    Here are some more details for you:
    Yes the queries are cached in that it gets its data from RAM and
    not from disk however the number of buffers used internally by
    Oracle RDBMS/Spatial is rather large and results in significant
    CPU usage (namely > 5000 per query or >40MByte). Which I'm sure
    you'd agree? Those numerous internal queries taking >10ms CPU
    time each, which is culmulative.
    A single real of ours query of will take between 180ms and 580ms
    depending on the number of results returned.
    An example query is:
    select a.id, a.geom
    from tile_med_lines_mbr a where sdo_relate
    (a.geom,mdsys.sdo_geometry
    (2003,NULL, NULL,mdsys.sdo_elem_info_array
    (1,1003,3),mdsys.sdo_ordinate_array(151.21121,
    -33.86325,151.21132,-33.863136)), 'mask=anyinteract
    querytype=WINDOW') = 'TRUE'
    Our 500Mhz PC Server database can only execute 3 processes
    running these queries simultaneously to go to 100% CPU loaded.
    The disk is hardly utilized.
    The data is the main roads in Sydney, Australia.
    The tables, data and indexes were created as shown below:
    1.     Create the Oracle tables:
    create table tile_med_nodes_mbr (
         id     number not null,
         geom     mdsys.sdo_geometry not null,
         xl     number not null,
         yl     number not null,
         xh     number not null,
         yh     number not null);
    create table tile_med_lines_mbr (
         id     number not null,
         fromid     number not null,
         toid     number not null,
         geom     mdsys.sdo_geometry not null,
         xl     number not null,
         yl     number not null,
         xh     number not null,
         yh     number not null);
    2.     Use the sqlldr Oracle loader utility to load the data
    into Oracle.
    % sqlldr userid=csiro_scats/demo control=nodes.ctl
    % sqlldr userid=csiro_scats/demo control=lines.ctl
    3.     Determine the covering spatial extent for the tile
    mosaic and use this to create the geometry metadata.
    % sqlplus
    SQLPLUS>     set numw 12
    SQLPLUS>     select min(xl), min(yl), max(xh), max(yh)
         from (select xl, yl, xh, yh
              from tile_med_nodes_mbr union
              select xl, yl, xh, yh
              from tile_med_lines_mbr);
    insert into USER_SDO_GEOM_METADATA
         (TABLE_NAME, COLUMN_NAME, DIMINFO)
         VALUES ('TILE_MED_NODES_MBR', 'GEOM',
         MDSYS.SDO_DIM_ARRAY
         (MDSYS.SDO_DIM_ELEMENT('X', 151.21093421,
                   151.21205421, 0.000000050),
         MDSYS.SDO_DIM_ELEMENT('Y', -33.86347146,
                   -33.86234146, 0.000000050)));
    insert into USER_SDO_GEOM_METADATA
         (TABLE_NAME, COLUMN_NAME, DIMINFO)
         VALUES ('TILE_MED_LINES_MBR', 'GEOM',
         MDSYS.SDO_DIM_ARRAY
         (MDSYS.SDO_DIM_ELEMENT('X', 151.21093421,
                   151.21205421, 0.000000050),
         MDSYS.SDO_DIM_ELEMENT('Y', -33.86347146,
                   -33.86234146, 0.000000050)));
    4.     Validate the data loaded:
    create table result
    (UNIQ_ID number, result varchar2(10));
    execute sdo_geom.validate_layer
    ('TILE_MED_NODES_MBR','GEOM','ID','RESULT');
    select result, count(result)
    from RESULT
    group by result;
    truncate table result;
    execute sdo_geom.validate_layer
    ('TILE_MED_LINES_MBR','GEOM','ID','RESULT');
    select result, count(result)
    from RESULT
    group by result;
    drop table result;
    5.     Fix any problems reported in the result table.
    6.     Create a spatial index, use the spatial index advisor to
    determine the sdo_level.
    create index tile_mlines_spind on
    tile_med_lines_mbr (geom) indextype is
    mdsys.spatial_index parameters
    ( 'sdo_level=7,initial=1M,next=1M,pctincrease=0');
    7.     Analyse table:
    analyze table TILE_MED_LINES_MBR compute statistics;
    8.     Find the spatial index table name:
    select sdo_index_table, sdo_column_name
    from user_sdo_index_metadata
    where sdo_index_name in
    (select index_name
    from user_indexes
    where ityp_name = 'SPATIAL_INDEX'
    and table_name = 'TILE_MED_LINES_MBR');
    9.     Analyse spatial index table:
    analyze table TILE_MLINES_SPIND_FL7$
    compute statistics;
    I hope this helps.
    Cheers
    Alex Eadie

  • Select in 10g and 11g R2

    Hi,
    a select in 10g and in 11g from the same table does not return the data in the same order.
    Any solution ?
    I have a dblink in a 10g reading a table in a 11g database.
    Is there any option in creating DB_LINK for that ?
    Thank you.

    user522961 wrote:
    Hi,
    a select in 10g and in 11g from the same table does not return the data in the same order.
    Any solution ?
    I have a dblink in a 10g reading a table in a 11g database.
    Is there any option in creating DB_LINK for that ?
    Thank you.What order? Use an Order By clause to get the data in the order you want .
    Aman....

  • What mechanism Oracle 10g use for write (Insert/ Update) and Read (Select)?

    Hi
    What mechanism Oracle 10g use for write (Insert/ Update) and Read (Select)?
    Thank you

    Aren't the answers given in PL/SQL forum sufficient enough?Well, as the first answer in that forum directed the OP to this forum you can hardly blame them for the repost.
    There is some high-level stuff in the Concepts Guide. If that is insufficient the OP will need to tell us what more details they need to know (and perhaps why).
    Cheers, APC

  • Performance Tuning 10g

    Hi All,
    I had given a task to tune oracle 10g database. I am really new in memory tuning although I had some SQL Tuning earlier. My server is in remote location and I can not login to Enterprise Manager GUI. I will be using SQL Developer or PL/SQL Developer for this. My application is web based application.
    I have following queries with this respect:
    - How should I start... Should I use tkprof or AWR.
    - How to enable these tools.
    - How to view its reports
    - What should I check in these reports
    - Will just increasing RAM improves performance or should we also increase Hard Disk?
    - What is CPU Cost and I/O?
    Please help.
    Thanks & Regards.

    dbdan wrote:
    Hi All,
    I had given a task to tune oracle 10g database. I am really new in memory tuning although I had some SQL Tuning earlier. My server is in remote location and I can not login to Enterprise Manager GUI. I will be using SQL Developer or PL/SQL Developer for this. My application is web based application.
    I have following queries with this respect:
    - How should I start... Should I use tkprof or AWR.
    - How to enable these tools.
    - How to view its reports
    - What should I check in these reports
    - Will just increasing RAM improves performance or should we also increase Hard Disk?
    - What is CPU Cost and I/O?
    Please help.
    Thanks & Regards.Here is something you might try as a starting point:
    Capture the output of the following (to a table, send to Excel, or spool to a file):
    SELECT
      STAT_NAME,
      VALUE
    FROM
      V$OSSTAT
    ORDER BY
      STAT_NAME;
    SELECT
      STAT_NAME,
      VALUE
    FROM
      V$SYS_TIME_MODEL
    ORDER BY
      STAT_NAME;
    SELECT
      EVENT,
      TOTAL_WAITS,
      TOTAL_TIMEOUTS,
      TIME_WAITED
    FROM
      V$SYSTEM_EVENT
    WHERE
      WAIT_CLASS != 'Idle'
    ORDER BY
      EVENT;Wait a known amount of time (5 minutes or 10 minutes)
    Execute the above SQL statements again.
    Subtract the starting values from the ending values, and post the results for any items where the difference is greater than 0. The Performance Tuning Guide (especially the 11g version) will help you understand what each item means.
    To repeat what Ed stated, do not randomly change parameters (even if someone claims that they have successfully made the parameter change 100s of times).
    You could also try a Statspack report, but it might be better to start with something which produces less than 70 pages of output.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • What is the difference between est. cost, CPU cost, and IO cost

    When looking at and execution plan there is est. cost, CPU cost, and IO cost.
    Can someone explain these and more importantly explain which one is the most
    important to tune and the step to take to reduce these cost to a respect level.
    I have seen many program hit 10,000 cost and 1 Mio CPU cost and I need to get that down to improve performance.
    I am running on 10.2.
    Thanks
    Mikie

    Hi Olivier,
    sorry to disagree but:
    > They're both important and you'll have to balance
    > both. For instance a program accessing the database
    > too much (lots of I/O) may run for ages. You can tune
    > this program and lower your I/Os, therefore
    > increasing your CPU time; the quantity of work is
    > still the same!
    is just not right.
    The amount of work to do for the database to get the job done (that is to deliver the requested results) may vary A LOT!
    That is why there is a optimizer at all.
    It's true: I/O cost model the time required to perform necessary read/write operations and CPU cost do the same for handling the data in memory.
    With indexes, database features active and database versions the optimizer can choose from selecting different access, filter and sorting mechanisms to answer the db requests.
    Usually there's not much you can do to the CPU costs - the database has it's internal rating concerning how "expensive" a sort-merge-join will be or a hash-distinct function.
    What you can (and usually should) do, is to lower the main contributor to processing and I/O costs: the volume of data.
    Therefore one will try to reduce the number of rows to be processed early in the query process. That can either be done by changing the selection itself or via the indexing scheme. Furthermore physical I/O might be reduced by using specific db features (compression, datablock sizing, bitmap indexes, partitioning etc.).
    Anyhow, to come back to the original post: it's important to think of costs as time-to-execute modelled in CPU-activity and I/O-operations.
    The goal is to deliver the result at the fastest - so, nobody should bother about the absolute numbers when it comes to costs. The question has to be: what execution time is meant with this?
    KR Lars

  • How to integrate from MS SQL SERVER 2005 and Flatfile to Oracle 10g.

    Hi
    I am new to ODI. I am trying to load sample data from MS SQL Server 2005 and Flatfile to Oracle 10g.
    1. I have created three models.
    1-1. SQL2005 (SRC_CUSTOMER table)
    1-2. Flatfile (SRC_AGE_GROUP.txt & SRC_SALES_PERSON.txt)
    1-3. Oracle 10g (TRG_CUSTOMER table)
    You may know I got those environments from the ODI DEMO environment.
    2. I could able to reverse the tables also.
    3. I have created an interface which contains source table (from MSSQL 2005), Flatfile and target table from ORACLE model.
    4. I have imported the knowledge modules. But I am confusing in selecting the knowledge modules to source and target tables.
    I've selected LKM File to SQL for flatfile model.
    I've also selected LKM SQL to SQL for MSSQL 2005 model and IKM Oracle Incremental Update for the target table (ORACLE).
    I've also implemented the interface that I created. It worked without errors. But there is no data in target table which is TRG_CUSTOMER.
    I really would like to know what happened and what the problems are.
    You can email me [email protected]
    Thanks in advance
    Jason Lee

    what did give for SRC_AGE_GROUP SRC_CUSTOMER join condition
    if it is
    (SRC_CUSTOMER.AGE=SRC_AGE_GROUP.AGE_MIN) AND SRC_CUSTOMER.AGE=SRC_AGE_GROUP.AGE_MAX
    give it as
    (SRC_CUSTOMER.AGE>SRC_AGE_GROUP.AGE_MIN) AND SRC_CUSTOMER.AGE<SRC_AGE_GROUP.AGE_MAX

  • XMLP 5.6.2 - Parameters -  Both Multi-Select and All-Select  Do Not Work

    Both Multi-Select and All-Select Do Not Work.
    What's up with this behavior?
    And when might it be fixed?
    BG...

    The Multi-Select is now working, not sure what I did wrong earlier. However the "Can select all" option when building the parameter does not work as advertised, though I was able to get around that as well.
    Create a Data Model
    select LAST_NAME, FIRST_NAME from SOME_TABLE where SOME_COLUMN =:SOME_VALUE
    OR
    select LAST_NAME, FIRST_NAME from SOME_TABLE where SOME_COLUMN in (:SOME_VALUE)
    Create a LOV
    Name = LOV_SOME_COLUMN
    Type = SQL Query
    select distinct SOME_TABLE.SOME_COLUMN as SOME_COLUMN from SCHEMA.TABLE
    Create a Parameter
    Identifier = PARM_SOME_COLUMN
    Data Type = String
    Default Value = NULL
    Parameter Type = Menu
    Display Label = LOV_SOME_COLUMN
    List Of Value = LOV_SOME_COLUMN
    Option
    Multiple Selection - Checked
    Can select all - Checked
    Refresh other parameters on change - Checked
    Then test your report. Select "All" from the LOV and click view. Result - No Rows Returned.
    Selecting a "Single" or "Multiple Values" values from the LOV does work.
    The way I am getting around the problem is to uncheck the "Can select all" and then manually select all the values in the LOV in order to get the "All".
    BG...

  • How to store photo images and thumbimpressions in oracle 10g database

    Hi all
    I have an web application running in Oracle 10g rel 1 database server in RHEL3. It has application server with forms and j2ee component as middle tier. I need to store centrally photo images and thumb impressions and use it in our application without any overhead on retrieval and performance of web application. what will be optimized method of storage of photo and thumb impressions. Awaiting your valuable suggestions.
    Regards
    Vijay Kumar

    Hi Vijay,
    How to store photo images and thumbimpressions in oracle 10g database I have working code here for storing photos in Oracle tables that you may find useful:
    http://www.dba-oracle.com/t_storing_insert_photo_pictures_tables.htm
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference"
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • GROUP BY and DISTINCT clause in single query

    Hi All,
    I have this query:
    SELECT studyid,baseline_no,trans_date, min(trunc(compass_date)),drug_related_yn
    FROM cp_bdr_trigger_tbl cbtt
    WHERE NOT EXISTS (SELECT 1
    FROM cp_patient_info_tbl
    WHERE studyid = cbtt.studyid
    AND baseline_no = cbtt.baseline_no)               
    AND studyid = '0431-020'
         GROUP BY BASELINE_NO,STUDYID,DRUG_RELATED_YN;
    The o/p of this query has around 20 rows with same studyid and distinct baseline_no.
    Now I want to select the data all to be distinct by limiting it somehow by GROUP BY clause.
    Is this possible?
    I mean grouping should be done in such a way that it should return distinct values only...
    The o/p of this query is input to other query for insertion in some table.
    * there is a Unique index in the target table on studyid+basline_no combination so the combination has to be unique*
    Thanks,
    Aashish S.

    The GROUP BY is in a way an implied DISTINCT because it will return ONE record for each of the columns identified in the GROUP BY clause.
    Either way your requirements aren't very clear. If you can please post the following we may be able to help:
    1. Oracle version (e.g. 10.2.0.4)
    2. CREATE / INSERT statements with sample data
    3. Expected output
    4. Use \ tags (surround #2 and #3 in these tags)
    5. Explanation of logic in achieving #3.
    Thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • CPU time and ELAPSED time in tkprof question

    Hi,
    I have a statment that is running more than 3 HR.
    I run 10046 event and found that the CPU time and the ELAPSED time is almost the same:
    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 3 0 1
    Fetch 97 10175.76 10094.81 11216 56387604 0 1441
    total 101 10175.76 10094.82 11216 56387607 0 1442
    Is that can indicate of a problem in the machine ?
    The TOP activity also shows 99% cpu usage.
    CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
    6 ? 24700 oracle 232 20 5448M 13184K run 195:34 99.18 99.00 oraclepcr
    Thanks

    Hi,
    Thank you for your replay.
    Its version 10204 on HP-UX with 24GB and 8 CPUs.
    No i dont have any MERGE JOIN CARTESIAN.
    The reason that i didnt upload the plan is because its too long...far too long ....
    call count cpu elapsed disk query current rows
    Parse 1 42.20 41.38 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 5 444.12 447.27 1153 2486187 0 61
    total 7 486.32 488.65 1153 2486187 0 61
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 65 (PSSYS)
    Rows Execution Plan
    0 SELECT STATEMENT MODE: ALL_ROWS
    0 UNION-ALL
    0 CONCATENATION
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 HASH JOIN (OUTER)
    0 HASH JOIN (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED
    LOOPS (OUTER)
    0 FILTER
    0 HASH
    JOIN (OUTER)
    0
    TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_RD_COMPANY'
    (TABLE)
    0
    NESTED LOOPS
    0
    NESTED LOOPS (OUTER)
    0
    NESTED LOOPS
    0
    NESTED LOOPS
    0
    HASH JOIN
    0
    TABLE ACCESS MODE:
    ANALYZED (FULL) OF 'PS_PROD
    _ITEM' (TABLE)
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID)
    OF 'PS_RO_LINE' (TABLE)
    0
    NESTED LOOPS
    0
    HASH JOIN
    0
    INDEX MOD
    E: ANALYZED (FULL SCAN)
    OF 'PS0RO_DEFN_HDSTAT'
    (INDEX)
    0
    TABLE ACCES
    S MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_RO_H
    EADER' (TABLE)
    0
    INDEX
    MODE: ANALYZED (RANGE
    SCAN) OF 'PSERO_HEADER'
    (INDEX)
    0
    INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'PSARO_LINE' (INDEX (UNIQ
    UE))
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RO_BOID' (TABLE)
    0
    INDEX MODE: ANALYZ
    ED (UNIQUE SCAN) OF 'PS_RO_
    BOID' (INDEX (UNIQUE))
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RF_INST_PROD' (TABLE)
    0
    INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'PS_RF_INST_
    PROD' (INDEX (UNIQUE))
    0
    TABLE ACCESS MODE: ANALYZED
    (BY INDEX ROWID) OF 'PS_RD_PER
    SON' (TABLE)
    0
    INDEX MODE: ANALYZED
    (UNIQUE SCAN) OF 'PS_RD_PERSO
    N' (INDEX (UNIQUE))
    0
    INDEX MODE: ANALYZED (RANGE
    SCAN) OF 'PS0RD_COMPANY' (INDEX)
    0 VIEW
    OF 'XLATTABLE_VW' (VIEW)
    0
    NESTED LOOPS
    0
    TABLE ACCESS MODE: ANALYZED
    (FULL) OF 'PSXLATITEM' (TABLE)
    0
    INDEX MODE: ANALYZED (UNIQUE
    SCAN) OF 'PS_PSXLATDEFN' (INDEX
    (UNIQUE))
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_RSF_INDUSTRY' (TABLE)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'PS3RSF_INDUSTRY' (INDEX)
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'NAP_CATALOG_NUM' (TABLE)
    0 INDEX
    MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_NAP_CATALOG_NUM' (INDEX (UNIQUE)
    0 MAT_VIEW
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'IP_CONNECTION_TYPES' (MAT_VIEW)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'IP_CONNECTION_TYPES_X1' (INDEX)
    0 TABLE ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'NAP_INTERNET' (TABLE)
    0 INDEX MODE:
    ANALYZED (UNIQUE SCAN) OF
    'PS_NAP_INTERNET' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RF_INST_PROD' (TABLE)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'PS_RF_INST_PROD' (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'NAP_CATALOG_NUM' (TABLE)
    0 INDEX MODE: ANALYZED
    (UNIQUE SCAN) OF 'PS_NAP_CATALOG_NUM'
    (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF 'BB_CODE_TABLE'
    (MAT_VIEW)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF 'BB_CODE_TABLE'
    (MAT_VIEW)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'IP_CONNECTION_TYPES' (MAT_VIEW)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'IP_CONNECTION_TYPES_X1'
    (INDEX)
    0 MAT_VIEW ACCESS MODE: ANALYZED
    (FULL) OF 'IP_PIRSUM_CODE' (MAT_VIEW)
    0 MAT_VIEW ACCESS MODE: ANALYZED
    (FULL) OF 'IP_PIRSUM_CODE' (MAT_VIEW)
    0 TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_BO_NAME' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN)
    OF 'PS_BO_NAME' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_BO_CM' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN)
    OF 'PS_BO_CM' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_BO_CM_USE' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS_BO_CM_USE' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_CM' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_CM' (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 INDEX MODE: ANALYZED (FULL SCAN) OF
    'PSHBO_NAME' (INDEX)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS1RD_PERSON' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RB_WORKER' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_RB_WORKER' (INDEX (UNIQUE))
    0 INDEX MODE: ANALYZED (FULL SCAN) OF 'PSHBO_NAME'
    (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RD_PERSON' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS1RD_PERSON' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RF_GRP_MEMBER' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PSARF_GRP_MEMBER' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RF_PROVIDER_GRP' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_RF_PROVIDER_GRP' (INDEX (UNIQUE))
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 HASH JOIN (OUTER)
    0 HASH JOIN (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED
    LOOPS (OUTER)
    0 FILTER
    0 HASH
    JOIN (OUTER)
    0
    TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_RD_COMPANY'
    (TABLE)
    0
    NESTED LOOPS
    0
    NESTED LOOPS
    0
    NESTED LOOPS (OUTER)
    0
    NESTED LOOPS
    0
    HASH JOIN
    0
    TABLE ACCESS MODE:
    ANALYZED (FULL) OF 'PS_PROD
    _ITEM' (TABLE)
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID)
    OF 'PS_RO_LINE' (TABLE)
    0
    NESTED LOOPS
    0
    HASH JOIN
    0
    INDEX MOD
    E: ANALYZED (FULL SCAN)
    OF 'PS0RO_DEFN_HDSTAT'
    (INDEX)
    0
    TABLE ACCES
    S MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_RO_H
    EADER' (TABLE)
    0
    INDEX
    MODE: ANALYZED (RANGE
    SCAN) OF 'PSERO_HEADER'
    (INDEX)
    0
    INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'PSARO_LINE' (INDEX (UNIQ
    UE))
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RO_BOID' (TABLE)
    0
    INDEX MODE: ANALYZ
    ED (UNIQUE SCAN) OF 'PS_RO_
    BOID' (INDEX (UNIQUE))
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RD_PERSON' (TABLE)
    0
    INDEX MODE: ANALYZED
    (UNIQUE SCAN) OF 'PS_RD_PERS
    ON' (INDEX (UNIQUE))
    0
    TABLE ACCESS MODE: ANALYZED
    (BY INDEX ROWID) OF 'PS_RF_INS
    T_PROD' (TABLE)
    0
    INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'PS_RF_INST_P
    ROD' (INDEX (UNIQUE))
    0
    INDEX MODE: ANALYZED (RANGE
    SCAN) OF 'PS0RD_COMPANY' (INDEX)
    0 VIEW
    OF 'XLATTABLE_VW' (VIEW)
    0
    NESTED LOOPS
    0
    TABLE ACCESS MODE: ANALYZED
    (FULL) OF 'PSXLATITEM' (TABLE)
    0
    INDEX MODE: ANALYZED (UNIQUE
    SCAN) OF 'PS_PSXLATDEFN' (INDEX
    (UNIQUE))
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_RSF_INDUSTRY' (TABLE)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'PS3RSF_INDUSTRY' (INDEX)
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'NAP_CATALOG_NUM' (TABLE)
    0 INDEX
    MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_NAP_CATALOG_NUM' (INDEX (UNIQUE)
    0 MAT_VIEW
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'IP_CONNECTION_TYPES' (MAT_VIEW)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'IP_CONNECTION_TYPES_X1' (INDEX)
    0 TABLE ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'NAP_INTERNET' (TABLE)
    0 INDEX MODE:
    ANALYZED (UNIQUE SCAN) OF
    'PS_NAP_INTERNET' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RF_INST_PROD' (TABLE)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'PS_RF_INST_PROD' (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'NAP_CATALOG_NUM' (TABLE)
    0 INDEX MODE: ANALYZED
    (UNIQUE SCAN) OF 'PS_NAP_CATALOG_NUM'
    (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF 'BB_CODE_TABLE'
    (MAT_VIEW)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF 'BB_CODE_TABLE'
    (MAT_VIEW)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'IP_CONNECTION_TYPES' (MAT_VIEW)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'IP_CONNECTION_TYPES_X1'
    (INDEX)
    0 MAT_VIEW ACCESS MODE: ANALYZED
    (FULL) OF 'IP_PIRSUM_CODE' (MAT_VIEW)
    0 MAT_VIEW ACCESS MODE: ANALYZED
    (FULL) OF 'IP_PIRSUM_CODE' (MAT_VIEW)
    0 TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_BO_NAME' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN)
    OF 'PS_BO_NAME' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_BO_CM' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN)
    OF 'PS_BO_CM' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_BO_CM_USE' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS_BO_CM_USE' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_CM' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_CM' (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 INDEX MODE: ANALYZED (FULL SCAN) OF
    'PSHBO_NAME' (INDEX)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS1RD_PERSON' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RB_WORKER' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_RB_WORKER' (INDEX (UNIQUE))
    0 INDEX MODE: ANALYZED (FULL SCAN) OF 'PSHBO_NAME'
    (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RD_PERSON' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS1RD_PERSON' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RF_GRP_MEMBER' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PSARF_GRP_MEMBER' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RF_PROVIDER_GRP' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_RF_PROVIDER_GRP' (INDEX (UNIQUE))
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 HASH JOIN (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 FILTER
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    0 NESTED LOOPS
    (OUTER)
    0 NESTED LOOPS
    (OUTER)
    0 NESTED
    LOOPS (OUTER)
    0 NESTED
    LOOPS
    0 NESTED
    LOOPS (OUTER)
    0
    NESTED LOOPS
    0
    HASH JOIN
    0
    TABLE ACCESS MODE: ANALYZED
    (FULL) OF 'PS_PROD_ITEM' (TABLE)
    0
    TABLE ACCESS MODE: ANALYZED
    (BY INDEX ROWID) OF 'PS_RO_LINE
    ' (TABLE)
    0
    NESTED LOOPS
    0
    HASH JOIN
    0
    INDEX MODE: ANALYZED
    (FULL SCAN) OF 'PS0RO_DEFN_H
    DSTAT' (INDEX)
    0
    TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RO_HEADER' (TABLE)
    0
    INDEX MODE: ANALYZ
    ED (RANGE SCAN) OF 'PSERO_H
    EADER' (INDEX)
    0
    INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'PSARO_LINE'
    (INDEX (UNIQUE))
    0
    TABLE ACCESS MODE: ANALYZED
    (BY INDEX ROWID) OF 'PS_RO_BOID'
    (TABLE)
    0
    INDEX MODE: ANALYZED (UNIQUE
    SCAN) OF 'PS_RO_BOID' (INDEX
    (UNIQUE))
    0
    TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'PS_RD_PERSON'
    (TABLE)
    0
    INDEX MODE: ANALYZED (UNIQUE
    SCAN) OF 'PS_RD_PERSON' (INDEX
    (UNIQUE))
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_RF_INST_PROD' (TABLE)
    0
    INDEX MODE: ANALYZED (RANGE
    SCAN) OF 'PS_RF_INST_PROD' (INDEX
    (UNIQUE))
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'PS_BO_NAME' (TABLE)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'PS_BO_NAME' (INDEX (UNIQUE))
    0 TABLE
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'NAP_CATALOG_NUM' (TABLE)
    0 INDEX
    MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_NAP_CATALOG_NUM' (INDEX (UNIQUE)
    0 MAT_VIEW
    ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'IP_CONNECTION_TYPES'
    (MAT_VIEW)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'IP_CONNECTION_TYPES_X1' (INDEX)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'PS_NAP_IP_DEBIT' (INDEX (UNIQUE))
    0 SORT
    (AGGREGATE)
    0 INDEX
    MODE: ANALYZED (RANGE SCAN) OF
    'PS_NAP_IP_DEBIT' (INDEX (UNIQUE))
    0 TABLE ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'NAP_CATALOG_NUM' (TABLE)
    0 INDEX MODE:
    ANALYZED (UNIQUE SCAN) OF
    'PS_NAP_CATALOG_NUM' (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'IP_CONNECTION_TYPES' (MAT_VIEW)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'IP_CONNECTION_TYPES_X1' (INDEX)
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RD_COMPANY' (TABLE)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF 'PS0RD_COMPANY'
    (INDEX)
    0 VIEW PUSHED PREDICATE
    OF 'XLATTABLE_VW' (VIEW)
    0 NESTED LOOPS
    0 TABLE ACCESS
    MODE: ANALYZED (BY INDEX ROWID) OF
    'PSXLATITEM' (TABLE)
    0 INDEX MODE:
    ANALYZED (RANGE SCAN) OF
    'PSBPSXLATITEM' (INDEX)
    0 INDEX MODE:
    ANALYZED (UNIQUE SCAN) OF
    'PS_PSXLATDEFN' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF
    'PS_RSF_INDUSTRY' (TABLE)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'PS3RSF_INDUSTRY' (INDEX)
    0 TABLE ACCESS MODE:
    ANALYZED (BY INDEX ROWID) OF 'PS_BO_CM'
    (TABLE)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'PS_BO_CM' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED
    (BY INDEX ROWID) OF 'PS_BO_CM_USE' (TABLE)
    0 INDEX MODE: ANALYZED
    (RANGE SCAN) OF 'PS_BO_CM_USE' (INDEX (UNIQUE)
    0 TABLE ACCESS MODE: ANALYZED
    (BY INDEX ROWID) OF 'PS_CM' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE
    SCAN) OF 'PS_CM' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'NAP_INTERNET' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE
    SCAN) OF 'PS_NAP_INTERNET' (INDEX (UNIQUE))
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN)
    OF 'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN)
    OF 'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY
    INDEX ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE: ANALYZED (FULL) OF
    'IP_PIRSUM_CODE' (MAT_VIEW)
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 MAT_VIEW ACCESS MODE: ANALYZED (BY INDEX
    ROWID) OF 'BB_CODE_TABLE' (MAT_VIEW)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'BB_CODE_TABLE_I' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID)
    OF 'PS_BO_NAME' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS_BO_NAME_IDX1' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RD_PERSON' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS1RD_PERSON' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RF_GRP_MEMBER' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PSARF_GRP_MEMBER' (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RF_PROVIDER_GRP' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
    'PS_RF_PROVIDER_GRP' (INDEX (UNIQUE))
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_BO_NAME' (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'PS_BO_NAME_IDX1' (INDEX)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF 'PS1RD_PERSON'
    (INDEX)
    0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
    'PS_RB_WORKER' (TABLE)
    0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'PS_RB_WORKER'
    (INDEX (UNIQUE))

  • Can't get CPU bound!

    Has anyone have any suggestions for the following set-up:
    we have a 4 Processor NT box with 512MB memory, 15GHD.
    We're running one instance of Weblogic (256 MB allocated) under Sun's 1.3
    Hotspot Server edition JVM. The components are all java, ie we're not
    calling any external interface, such as a database, filesystem etc at the
    moment (its just for testing).
    When we hit the server usings test clients , whatever we do its impossible
    to get the CPU processor time above 50 percent, the clients themselves are
    not CPU bound either (usings between 50 and 400 clients). Currently we're
    getting about 50 http pages/sec, but I feel we could achieve more than this,
    as it appears that Weblogic is not using all of the available CPU. I've
    tried changing the amount of threads etc, but this does not seem to make any
    difference.
    The only thing that springs mind it the possibility that we're network
    bound, but I find that very hard to believe, as we've never seen this befire
    on the network here. Does anyone have any suggestions?
    Thanks

    It's impossible for us to tell your limiting factor without some more
    information.
    However, I have run similar benchmarks on NT machines with WLS serving
    up web pages and Servlets/JSP. I was able to saturate 4 cpus, but I
    used 4 100BaseT cards, and I needed to increase my execute thread count
    to ~35.
    -- Rob
    wayne wrote:
    >
    Has anyone have any suggestions for the following set-up:
    we have a 4 Processor NT box with 512MB memory, 15GHD.
    We're running one instance of Weblogic (256 MB allocated) under Sun's 1.3
    Hotspot Server edition JVM. The components are all java, ie we're not
    calling any external interface, such as a database, filesystem etc at the
    moment (its just for testing).
    When we hit the server usings test clients , whatever we do its impossible
    to get the CPU processor time above 50 percent, the clients themselves are
    not CPU bound either (usings between 50 and 400 clients). Currently we're
    getting about 50 http pages/sec, but I feel we could achieve more than this,
    as it appears that Weblogic is not using all of the available CPU. I've
    tried changing the amount of threads etc, but this does not seem to make any
    difference.
    The only thing that springs mind it the possibility that we're network
    bound, but I find that very hard to believe, as we've never seen this befire
    on the network here. Does anyone have any suggestions?
    Thanks

  • MSS and Service Selection

    Hi All,
    I am creating a model service specification say for construction of house. There are various outline paths say different floors and services under each path. However some services like RCC work are being used under more than one outline path. While selcting services from MSS completely or partially, is it possible to get the sum of quantities of a service as asingle service line itemin PR or PO?
    Prashant

    There is a subtle but important difference between service selection and playing content from another service. This applies to JMF players in general, and not just MediaSelectControl.
    Playing new content involves the following steps
    1) Read the SI that is needed to decode and play the new content, and start playing it.
    Service selection involves the following steps:
    1) Tune to the TS containing the new service (if necessary).
    2) Read the SI that is needed to decode and play the default streams from the new service, and start playing them.
    3) Begin monitoring the AIT, and kill/start applications as instructed.
    I bolded the last step because that is the important one, and is the one that differentiates playing a new stream from service selection. A service consists of both video/audio and the applications, and so selecting a new service involves changing both of those elements.
    Simply playing a different video stream, no matter what the source, doesn't change the set of apps that will run. Event tuning to a new TS doesn't change this (although it may affect the ability to load them).
    Because of this, MediaSelectControl never causes a service selection operation, and neither does creating a Player for a different service. In both cases, the MHP implementation will still monitor the AIT on the original service. As you've alreadsy noted, mediaSelectControl will not cause the box to tune (neither will creating a new Player), but this is simply to prevent apps inconveniencing other apps unless they explicitly choose to do so.
    To answer your last question, it looks like the JavaTV RI is not MHP compliant.
    Hopefully this will clarify things a little, but if not let me know where is still confusing and I'll try to answer.
    Steve

  • DISTINCT Select List SQL

    I am trying to create a distinct select list with a substr to remove either everything after a ":" or a word at the end of the field and am having a little trouble. Hope someone can help.
    We are on Version 4.1 and I am in the Shared Components for current database. I can get the distinct to work but not the substr.
    This works without :
    select distinct GROUP_VP_DESC D,
    GROUP_VP_DESC R
    from xxc.XXC_GL_DIV_REG_FAC
    order by 1
    This works in TOAD, so tried to insert into sql above but keep getting error about in-line query:
    select distinct(substr(group_vp_desc, 1,instr(group_vp_desc, ':',1)-1)) "Group"
    from xxc.XXC_GL_DIV_REG_FAC
    order by 1
    Any assistance is appreciated, thank you in advance.
    Krise

    You are missing the return value in the query, but in case you just mis typed, I have had to wrap select statements with another select for lists with complex code.
    e.g.
    Select group, ret from
    select distinct(substr(group_vp_desc, 1,instr(group_vp_desc, ':',1)-1)) "Group", distinct(substr(group_vp_desc, 1,instr(group_vp_desc, ':',1)-1)) "Ret"
    from xxc.XXC_GL_DIV_REG_FAC
    order by 1

  • How to find the cpu cost and i/o cost  by a query

    I have a query that give the cpu utilization for a session.
    select s.name, m.value from v$statname s, v$mystat m
    where s.statistic# = m.statistic#
    and name = 'CPU used by this session';
    But how do you find the cpu cost and i/o cost by a query?

    Sounds like you want to use TRACE.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01020

Maybe you are looking for