Fine tuning the database query

To analyse the load of a particular object. we do use 'performance analysis' in ABAP. But let us suppose we've come to know that more load is on the database. i.e. suppose 80% on database, 20% on Application server. what could be the possible steps that u wud perform on the query so that the load gets decreased. we don't have a chance to transform the load from database to application server (such as using internal tables and hence reducing the load). we should do something on the database side. so what can we do. any solution would be highly appreciated.
thanks in advance for the solution.

Hi,
You should use ST05 and then Switch TRACE ON for SQL.
Then do your query again.
After you have run your query, you switch the trace OFF and then you display the trace.
When displaying the trace you can see which SQL queries that have been made and how long time they have taken (left most column).
If the time is RED that indicates a bad query.
Anyway. Doubleclick on the query to find out how the query is made.
And analyse the table(s) that are used and whether or not an INDEX is used.
If no index is used you can ADD an index to the database table(s) in transaction SE10. Or directly in the database if you have that possibilty.
ST05,
Trace on,
Run query,
Trace off,
Display trace,
Analyze trace.
Good luck!
BR Mattias

Similar Messages

  • Cannot find the "Database query" in CUIC 10.5

    Hi Everybody, 
    I am trying to create a custom report in CUIC (UCCX10.5)
    By following the instruction below: 
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/intelligence_suite/intelligence_suite_1051/user/guide/CUIC_BK_CAD76E49_00_unified-intelligence-center-cust-report/CUIC_BK_CAD76E49_00_cisco-unified-intelligence-center-report_chapter_0101.html#CUIC_TK_C8A91801_00
    In "Create a Report Definition of Type Database Query" section, Step 7 "From the Query Type drop-down list, select Database Query"
    I cannot see this option, do I miss out anything ?
    Anybody can help?
    Thanks in advance
    Sam

    There are two version of CUIC, standard and premium.
    CCX comes with the standard version.
    In order to create new reports you need the premium version, this has the Report Definitions drawer that allows you to select the Database query and upload your SQL.
    You will need to create a report on a premium CUIC and then export and upload to the CUIC on your CCX system.
    You will need to install a premium CUIC system and you can get a demo premium license from the Cisco licensing portal that I think lasts for 90 days.
    Sorry you won't be creating any new reports on your CCX you can only customise the display of existing reports.
    Graham

  • How to guide for Fine tuning the performance of SAP EP

    All,
    Could anyone please let me know where to locate the how to guide for fine tuning the performance of the SAP Enterprise Portal?
    thanks,
    ~L

    hi leena,
    Look into these threads...
    https://www.sdn.sap.com/irj/sdn/thread?threadID=119605
    https://www.sdn.sap.com/irj/sdn/thread?threadID=101325
    Also see,
    <a href="https://websmp103.sap-ag.de/~form/sapnet?_SHORTKEY=00200797470000073623&_OBJECT=011000358700001480992005E">this link</a>
    https://media.sdn.sap.com/public/eclasses/bwp04/PortalTuning_files/Default.htm
    Regs,
    jaga
    Message was edited by: jagadeep sampath

  • Fine Tuning The Enterprise Portal

    Hello world
    Currently i am searching about the best ways to fine tune our E Portal the below Info are the results of my search so far.
    Hope They Help You and please share any knowledge you have around this area.
    Tuning The E-Portal
    1-Tunable Parameters of SAP Web Application Server (JAVA)
    :Reducing the Network Traffic -From the Config Tool window,
    select: <instance> + services + http, and change the
    value of the following properties:
    -NeverCompressed: delete this values --> *.css, *.pdf, *.js, image,
    application/pdf, text/JavaScript
    -CacheControl: 604800
    Servlet_js p
    -EnableChunkedResponse: True
    -MinimumGZipLength:  1024
    2-SAP Web Application Server (Java) Monitoring Server
    Adjusting Log Severity Levels
    - re adjust the severty from ALL to ERROR
    3-Disabling the Distributed Statistics Service
    1.Run\usr\sap\<system_number>\JC<instance_id>\j2ee\configtool
    \offlinecfgeditor.bat
    2. Select Configurations -> cluster_data -> server -> cfg -> services->
    Propertysheet dsr-runtime -> <edit-button> -> startup-mode ->
    3. Select Custom and enter manual, and then select Apply custom .
    4. Restart the cluster.
    4- PRT Configuration
    \usr\sap\<system_id>\JC<instance_number>\j2ee\cluster\server<number>\apps\sap.com\irj
    \servlet_jsp\irj\root\WEB-INF\portal\system\properties
    SET
    -async.response.pool.size=100
    -PRT monitor  monitor.off=false
    -Log on to the portal as an administrator, and navigate to:
    System Administration -> Monitoring -> Portal
    -> Components Overview System Administration ->Monitoring ?? Portal ?? Threads Overview
      to help you identify bottlenecks in performance.
    5-Tuning the Application Server
    - Configuring JVM parameters on AS Java
    Set <-XX:SoftRefLRUPolicyMSPerMB=1000> (from default 1)
    - Avoiding session leaks - Tracing Single User Sessions
    - Tuning HTTP Provider Service
    -Enabling production mode
    6-Java Memory Analyzer Tool
    -Install Java Memory Analyzer Tool MAT
    - run performance reports using Solution Manger  // this only work if you have running solution manger on your system
    If You Have Any Tips Please Share
    Regards,
    Ahmed Salam

    Dear Ashish,
    From the Config Tool window --> Servlet_js p Tap
    -EnableChunkedResponse: True
    -MinimumGZipLength:  1024
    Read carfuly and you will find the answers
    Hope it helped
    Regards,
    Ahmed Salam.

  • Fine tuning Oracle database using EM DB control

    What are the good features with we should use to fine tune the db system using em db control.

    All the diagnostics pack and the tuning pack capabilities are designed specifically to do what you ask.. As made available using the AWR and ADDM and used through the 'Advisor Central' link on the EM console.
    You use them the way demonstrated in the online tutorials: http://www.oracle.com/technology/products/oem/index.html and look through the documentation indicated, especially under the links "Demos and Tutorials"

  • What  is command used to run the the  database query sripts?

    Hi all,
    i got some clue from another thread and i observed the command is like
    sqlcli -d DBNAME -u SQLUSER,SQLPASS -i filename.sql -c <delimiter> is there,
    when i use this the only first query is successfully executing,
    this might be problem with delimiter.
    can any body help how to use delimiter in the script file with an example.
    thanks in advance.
    --Hari

    Hello Hari,
    1. Please let me know the database version & sqlcli tool version, which you are using:
         sdbregview -l
         < review the installed the database software packages >
         xinstinfo <DBNAME>
         < to check the Kernelversion of your database >
         sqlcli -v
         < to check the version of sqlcli >
    2. Please update with the options/statements you was running.
       What errors/problems did you get?
    3. For example, I run on the local server:
      sqlcli -d NLK -u sapr3,sap
    sqlcli NLK=> \i c:\test\run_1.sql
    0 rows affected (3 msec)
    0 rows affected (2 msec)
    sqlcli NLK=> \i c:\test\run_2.sql
    1 row affected (3 msec)
    1 row affected (2 msec)
    sqlcli NLK=> \i c:\test\run_3.sql
    0 rows affected (4 msec)
    1 row affected (2 msec)
    1 row affected (2 msec)
    1 row affected (2 msec)
    sqlcli NLK=> select * from a3
    COL1
    COL2
    56
    49
    44
    12
    48
    12
    3 rows selected (2 msec)
    Run_1:
    create table a1 (col1 int NOT NULL default '0', col2 int NOT NULL default '0')
    create table a2 (col1 int NOT NULL default '0', col2 int NOT NULL default '0')
    Run_2:
    INSERT INTO a1 values (56,49)
    insert into a2 values (44,12)
    Run_3:
    create table a3 (col1 int NOT NULL default '0', col2 int NOT NULL default '0')
    INSERT INTO a3 values (56,49)
    insert into a3 values (44,12)
    insert into a3 values (48,12)
    4. To use option '-c <separator>' example:
    sqlcli -d NLK -u sapr3,sap -c /# -i c:\test\run_4.sql
    COL1
    COL2
    56
    49
    56
    49
    44
    12
    48
    12
    Run_4::
    create table a3 (col1 int NOT NULL default '0', col2 int NOT NULL default '0')
    INSERT INTO a3 values (56,49)
    insert into a3 values (44,12)
    insert into a3 values (48,12)
    commit
    select * from a3
    Thank you and best regards, Natalia Khlopina
    Add number 4. example.
    Message was edited by:
            Natalia Khlopina

  • Could I refactor the Database query functions?

    Hi,
    I have a lot of functions which doing the database queries. They all return map. "select to_chat(key), to_chart(value) from table"
    code like following. Since so many database access parts are same.
    only "query", and "preparestatement. setString(1, "aa") , preparestatement. setString(2, "aa") ..........." are different . I wonder if I could refactor them.
    If I could, I use dataSource in websphere. Is there any syncronizaion issue in it.
    Thank you so much.
    public Map getPriceChangeData(
              Timestamp openTime,
              Timestamp closeTime)
              throws Exception {
    TreeMap openCloseData = new TreeMap();
    Connection conn = null;
    PreparedStatement pstmt = null;
    ResultSet rs = null;
    final String query ="select to_char(?), to_char(?) from table1";
    try {
    conn = DSDataLayer.connect();
    pstmt = conn.prepareStatement(query);
    pstmt.setInt(1, 3);
    psmt.setInt(2. 6);
    ( the psmt.set... could be any number
    rs = pstmt.executeQuery();
    while (rs.next()) {
    openClosetData.put(
         rs.getString(1),
         rs.getString(2));
    return openClosetData;
    } catch (SQLException se) {
    String err =GETOPENCLOSE_ERR+ "on query"
    + query
    + " "
         + se.toString();
                   throw new Exception(err);
              } catch (Exception e) {
                   String err = GETOPENCLOSE_ERR
                             + e.toString();
                   throw new Exception(err);
              } finally {
                   try {
                        if (rs != null)
                             rs.close();
                        if (pstmt != null)
                             pstmt.close();
                        if (conn != null)
                             conn.close();
                   } catch (SQLException sqle) {
                        //log error and continue
                   } finally {
                        rs = null;
                        pstmt = null;
                        conn = null;
         }

    ResultSet rs = st.executeQuery("SELECT Customer_No FROM ServiceLogRecdb1");
    while(rs.next())
    {System.out.println(rs.getString("ServiceNo")+"\t"+rs.getString ("CustomerNo")+"\t"+rs.getString("IBMPMRNo"));
    Customer_No.setText(rs.getString("CustomerNo"));
    iServiceNo.setText(rs.getString("ServiceNo"));
    iCompanyName.setText(rs.getString("CompanyName"));
    iAddress.setText(rs.getString("Address"));
    iWorkOrderNo.setText(rs.getString("WorkOrderNo"));
    iTotalHours.setText(rs.getString("TotalHours"));
    iRequestDate.setText(rs.getString("RequestDate"));
    iContactNo.setText(rs.getString("ContactNo"));
    iRequestedBy.setText(rs.getString("RequestedBy"));
    iTimeIn.setText(rs.getString("TimeIn"));
    iTimeOut.setText(rs.getString("TimeOut"));
    iHoursDeducted.setText(rs.getString("HoursDeducted"));
    iIBMPMRNo.setText(rs.getString("IBMPMRNo"));
    iServiceDescriptionRequest.setText(rs.getString("ServiceDescriptionRequest"));
    iActionTaken.setText(rs.getString("ActionTaken"));
    iEngineer.setText(rs.getString("Engineer")); }Wrong implementation....
    if SELECT Customer_No FROM ServiceLogRecdb1 is your query it is certain that the ResultSet Holds values of only Customer_No not all other fields.
    I advice u to recheck wid your DB query again.....
    REGARDS,
    RaHuL

  • Inputs for Fine tuning the program

    Hi All,
    Following code is taking lot of time... No i need to fine tune the same ,,,
    Please give some inputs..
    SELECT VBELN INTO VBUK-VBELN FROM VBUK
    WHERE ( CMGST EQ 'B' OR CMGST EQ 'C' )
    AND VBELN IN S_VBELN.
    SELECT * FROM VBAP WHERE VSTEL IN SHP_PT
    AND VBELN EQ VBUK-VBELN
    AND VKGRU '101'.
    SELECT VBELN POSNR EDATU FROM VBEP
    INTO (VBEP-VBELN,VBEP-POSNR,VBEP-EDATU)
    WHERE VBELN EQ VBAP-VBELN AND POSNR EQ VBAP-POSNR
    AND LFREL EQ 'X' AND BMENG GT 0
    AND EDATU BETWEEN DATE_LOW
    AND DAT_HIGH
    ORDER BY EDATU VBELN POSNR.
    CLEAR LIPS.
    PERFORM APPEND_DATA_TO_ITAB1 TABLES ITAB1
    USING VBEP-VBELN VBEP-POSNR
    VBEP-EDATU LIPS-VBELN
    LIPS-POSNR vbap-VSTEL.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    Regards,
    Chan
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Edited by: Thomas Zloch on Nov 24, 2010 1:17 PM

    HI,
    Remove the select endselect the select all the entries into internal table then from tat internal table select by using for all entries into another internal table. for eq -
    IF NOT s_vbeln[] IS INITIAL.
      SELECT vbeln cmgst
            INTO TABLE itvbuk
            FROM vbuk
            WHERE vbeln IN s_vbeln.
      DELETE itvbuk WHERE  cmgst NE 'B' AND cmgst NE 'C' .
    ENDIF.
    IF NOT itvbuk[] IS INITIAL.
      SELECT *
             FROM vbap
             INTO TABLE itvbap
             FOR ALL ENTRIES IN itvbuk
             WHERE vbeln EQ itvbuk-vbeln.
      DELETE itvbap WHERE vkgru NE '101' AND NOT vstel IN shp_pt.
    ENDIF.
    Like wise modify the logic and check the secondary index is available for the where clause which you will be specifing.
    Regards,
    Madhukar Shetty

  • Fine tuning Oracle database

    Forward me please any suggestion/ways to fine tune Oracle database with using Toad/ Solars , or any other methods.
    Arif

    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/toc.htm

  • Fine tuning the logging to cisco device

    Dear Netpro Community,
    I am trying to fine tune the AAA portion on the cisco device
    Here is my current configuration:
    aaa new-model
    aaa authentication login default group radius local
    aaa authentication enable default group radius enable
    If the radius server is offline, the first level is not a problem. However, the issue occurs if I want to go to enable mode. It will not use the enable password defined locally, but instead it will go to and search for radius server for authentication.
    Debug:
    test_switch>en
    Password:
    01:05:15: RADIUS: Authenticating using $enab15$
    01:05:15: RADIUS: ustruct sharecount=1
    01:05:15: RADIUS: Initial Transmit tty0 id 44 x.x.x.x:1812, Access-Request,
    len 72
    01:05:15: Attribute 4 6 AC10E10F
    01:05:15: Attribute 5 6 00000000
    01:05:15: Attribute 61 6 00000000
    01:05:15: Attribute 1 10 24656E61
    01:05:15: Attribute 2 18 69ABFDF8
    01:05:15: Attribute 6 6 00000006
    01:05:20: RADIUS: Retransmit id 44
    01:05:25: RADIUS: Retransmit id 44
    01:05:30: RADIUS: Retransmit id 44
    Password:
    01:05:35: RADIUS: Marking server x.x.x.x:1812,1813 dead
    01:05:35: RADIUS: Tried all servers.
    01:05:35: RADIUS: No valid server found. Trying any viable server
    01:05:35: RADIUS: Tried all servers.
    01:05:35: RADIUS: No response for id 44
    01:05:35: RADIUS: No response from server
    % Password: timeout expired!
    % Error in authentication.
    How do I ensure that i can access the switch in privilege mode if there is no path to the radius server?

    Jagdeep:
    With the default "radius-server retransmit" value, there are (potentially) three retransmissions that may occur if the RADIUS server doesn't respond to the first request. With a 1 sec. "radius-server timeout", this provides a four second window of opportunity for a successful response.
    If he doesn't want to use a "radius-server timeout" as low as 1 sec. (per your concern), he can use the "radius-server retransmit" command to constrain (to a reasonable period) the time required to mark an MIA RADIUS Server as dead.
    e.g.:
    radius-server host aaa.bbb.ccc.ddd auth-port 1812 acct-port 1813 timeout 2 retransmit 1 key xxxxxxxxxx
    Contrary to your statement, your approach and mine are trying to facilitate the same thing, i.e.: accommodating fall back to the enable method prior to login timeout.
    However, your recommendation only results in a successful login after 20+ sec., due to postponement of fall back, resulting from the 20 sec. spent determining that the MIA RADIUS Server is dead.
    I don't ever want to wait 20+ sec. for a login, and don't find it necessary to wait that long to conclude that an AAA server is MIA.

  • Tuning the sql query when we have 30 Million records

    Hi Friends,
    I have query which takes around 25 to 30 Minutes to retrieve 9 Million records.
    Oracle version=11.2.0.2
    OS=Solaris 10 64bit
    query details
    CREATE OR REPLACE VIEW TIBEX_ORDERSBYQSIDVIEW
    AS 
    SELECT  A."ORDERID", A."USERORDERID", A."ORDERSIDE", A."ORDERTYPE",
              A.ORDERSTATUS, A.BOARDID, A.TIMEINFORCE, A.INSTRUMENTID,
              A.REFERENCEID, A.PRICETYPE, A.PRICE, A.AVERAGEPRICE,
              A.QUANTITY, A.MINIMUMFILL, A.DISCLOSEDQTY, A.REMAINQTY,
              A.AON, A.PARTICIPANTID, A.ACCOUNTTYPE, A.ACCOUNTNO,
              A.CLEARINGAGENCY, A.LASTINSTRESULT, A.LASTINSTMESSAGESEQUENCE,
              A.LASTEXECUTIONID, A.NOTE, A.TIMESTAMP, A.QTYFILLED, A.MEID,
              A.LASTINSTREJECTCODE, A.LASTEXECPRICE, A.LASTEXECQTY,
              A.LASTINSTTYPE, A.LASTEXECUTIONCOUNTERPARTY, A.VISIBLEQTY,
              A.STOPPRICE, A.LASTEXECCLEARINGAGENCY, A.LASTEXECACCOUNTNO,
              A.LASTEXECCPCLEARINGAGENCY, A.MESSAGESEQUENCE,
              A.LASTINSTUSERALIAS, A.BOOKTIMESTAMP, A.PARTICIPANTIDMM,
              A.MARKETSTATE, A.PARTNEREXID, A.LastExecSETTLEMENTCYCLE,
              A.LASTEXECPOSTTRADEVENUETYPE, A.PRICELEVELPOSITION,
              A.PREVREFERENCEID, A.EXPIRYTIMESTAMP, matchType,
              a.lastExecutionRole, a.MDEntryID, a.PegOffset,
              a.haltReason, A.COMPARISONPRICE, A.ENTEREDPRICETYPE,
              A.ISPEX, A.CLEARINGHANDLING, B.qsid
        FROM  tibex_Order A,
              tibex_Participant b
        WHERE a.participantID = b.participantID
          AND (A.MessageSequence, A.OrderID) IN (
                SELECT  max(C.MessageSequence), C.OrderID
                  FROM  tibex_Order C
                  WHERE LastInstRejectCode = 'OK'
                  GROUP By C.OrderID
          AND a.OrderStatus IN (
                SELECT OrderStatus
                  FROM  tibex_orderStatusEnum
                  WHERE ShortDesc IN (
                          'ORD_OPEN', 'ORD_EXPIRE', 'ORD_CANCEL', 'ORD_FILLED','ORD_CREATE','ORD_PENDAMD','ORD_PENDCAN'
      UNION ALL
      SELECT  A.ORDERID, A.USERORDERID, A.ORDERSIDE, A.ORDERTYPE,
              A.ORDERSTATUS, A.BOARDID, A.TIMEINFORCE, A.INSTRUMENTID,
              A.REFERENCEID, A.PRICETYPE, A.PRICE, A.AVERAGEPRICE,
              A.QUANTITY, A.MINIMUMFILL, A.DISCLOSEDQTY, A.REMAINQTY,
              A.AON, A.PARTICIPANTID, A.ACCOUNTTYPE, A.ACCOUNTNO,
              A.CLEARINGAGENCY, A.LASTINSTRESULT, A.LASTINSTMESSAGESEQUENCE,
              A.LASTEXECUTIONID, A.NOTE, A.TIMESTAMP, A.QTYFILLED, A.MEID,
              A.LASTINSTREJECTCODE, A.LASTEXECPRICE, A.LASTEXECQTY,
              A.LASTINSTTYPE, A.LASTEXECUTIONCOUNTERPARTY, A.VISIBLEQTY,
              A.STOPPRICE, A.LASTEXECCLEARINGAGENCY, A.LASTEXECACCOUNTNO,
              A.LASTEXECCPCLEARINGAGENCY, A.MESSAGESEQUENCE,
              A.LASTINSTUSERALIAS, A.BOOKTIMESTAMP, A.PARTICIPANTIDMM,
              A.MARKETSTATE, A.PARTNEREXID, A.LastExecSETTLEMENTCYCLE,
              A.LASTEXECPOSTTRADEVENUETYPE, A.PRICELEVELPOSITION,
              A.PREVREFERENCEID, A.EXPIRYTIMESTAMP, matchType,
              a.lastExecutionRole, A.MDEntryID, a.PegOffset,
              a.haltReason, A.COMPARISONPRICE, A.ENTEREDPRICETYPE,
              A.ISPEX, A.CLEARINGHANDLING, B.qsid
        FROM  tibex_Order A,
              tibex_Participant b
        WHERE a.participantID = b.participantID
          AND orderstatus in (
                SELECT  orderstatus
                  FROM  tibex_orderStatusEnum
                  WHERE ShortDesc in ('ORD_REJECT')
          AND 1 IN (
                  SELECT count(*)
                    FROM tibex_order c
                    WHERE c.orderid=a.orderid
                      AND c.instrumentID=a.instrumentID
    /Tried by modifying the query but same result was not retrieved but it was Quicker 6 min.Can Somebody check where i am going wrong.
    CREATE OR REPLACE VIEW TIBEX_ORDERSBYQSIDVIEW
    AS   
    WITH REJ AS
    SELECT ROWID RID
    FROM   TIBEX_ORDER
    WHERE  ORDERSTATUS = (SELECT ORDERSTATUS
                          FROM   TIBEX_ORDERSTATUSENUM
                          WHERE  SHORTDESC = 'ORD_REJECT')
    REJ1 AS
    SELECT ROWID RID
    FROM   TIBEX_ORDER
    WHERE  ORDERSTATUS NOT IN (SELECT ORDERSTATUS
                               FROM   TIBEX_ORDERSTATUSENUM
                               WHERE  SHORTDESC = 'ORD_NOTFND'
                               OR     SHORTDESC = 'ORD_REJECT')
    SELECT O.*,
           P.QSID
    FROM   TIBEX_ORDER O,
           TIBEX_PARTICIPANT P
    WHERE  O.PARTICIPANTID = P.PARTICIPANTID
    AND    O.ROWID IN (
                       SELECT RID
                       FROM   (
                               SELECT   ROWID RID,
                                        ORDERSTATUS,
                                        RANK () OVER (PARTITION BY ORDERID ORDER BY MESSAGESEQUENCE ASC) R
                               FROM     TIBEX_ORDER
                       WHERE  R = 1
                       AND    RID IN (SELECT RID FROM REJ)
    UNION ALL
    SELECT O.*,
           P.QSID
    FROM   TIBEX_ORDER O,
           TIBEX_PARTICIPANT P
    WHERE  O.PARTICIPANTID = P.PARTICIPANTID
    AND    O.ROWID IN (
                       SELECT RID
                       FROM   (
                               SELECT   ROWID RID,
                                        ORDERSTATUS,
                                        RANK () OVER (PARTITION BY ORDERID ORDER BY MESSAGESEQUENCE DESC) R
                               FROM     TIBEX_ORDER
                       WHERE  R = 1
                       AND    RID IN (SELECT RID FROM REJ1)
                      );Regards
    NM

    Hi Satish,
    CREATE OR REPLACE VIEW TIBEX_ORDERSBYQSIDVIEW
    (ORDERID, USERORDERID, ORDERSIDE, ORDERTYPE, ORDERSTATUS,
    BOARDID, TIMEINFORCE, INSTRUMENTID, REFERENCEID, PRICETYPE,
    PRICE, AVERAGEPRICE, QUANTITY, MINIMUMFILL, DISCLOSEDQTY,
    REMAINQTY, AON, PARTICIPANTID, ACCOUNTTYPE, ACCOUNTNO,
    CLEARINGAGENCY, LASTINSTRESULT, LASTINSTMESSAGESEQUENCE, LASTEXECUTIONID, NOTE,
    TIMESTAMP, QTYFILLED, MEID, LASTINSTREJECTCODE, LASTEXECPRICE,
    LASTEXECQTY, LASTINSTTYPE, LASTEXECUTIONCOUNTERPARTY, VISIBLEQTY, STOPPRICE,
    LASTEXECCLEARINGAGENCY, LASTEXECACCOUNTNO, LASTEXECCPCLEARINGAGENCY, MESSAGESEQUENCE, LASTINSTUSERALIAS,
    BOOKTIMESTAMP, PARTICIPANTIDMM, MARKETSTATE, PARTNEREXID, LASTEXECSETTLEMENTCYCLE,
    LASTEXECPOSTTRADEVENUETYPE, PRICELEVELPOSITION, PREVREFERENCEID, EXPIRYTIMESTAMP, MATCHTYPE,
    LASTEXECUTIONROLE, MDENTRYID, PEGOFFSET, HALTREASON, COMPARISONPRICE,
    ENTEREDPRICETYPE, ISPEX, CLEARINGHANDLING, QSID)
    AS
    SELECT  A."ORDERID", A."USERORDERID", A."ORDERSIDE", A."ORDERTYPE",
              A.ORDERSTATUS, A.BOARDID, A.TIMEINFORCE, A.INSTRUMENTID,
              A.REFERENCEID, A.PRICETYPE, A.PRICE, A.AVERAGEPRICE,
              A.QUANTITY, A.MINIMUMFILL, A.DISCLOSEDQTY, A.REMAINQTY,
              A.AON, A.PARTICIPANTID, A.ACCOUNTTYPE, A.ACCOUNTNO,
              A.CLEARINGAGENCY, A.LASTINSTRESULT, A.LASTINSTMESSAGESEQUENCE,
              A.LASTEXECUTIONID, A.NOTE, A.TIMESTAMP, A.QTYFILLED, A.MEID,
              A.LASTINSTREJECTCODE, A.LASTEXECPRICE, A.LASTEXECQTY,
              A.LASTINSTTYPE, A.LASTEXECUTIONCOUNTERPARTY, A.VISIBLEQTY,
              A.STOPPRICE, A.LASTEXECCLEARINGAGENCY, A.LASTEXECACCOUNTNO,
              A.LASTEXECCPCLEARINGAGENCY, A.MESSAGESEQUENCE,
              A.LASTINSTUSERALIAS, A.BOOKTIMESTAMP, A.PARTICIPANTIDMM,
              A.MARKETSTATE, A.PARTNEREXID, A.LastExecSETTLEMENTCYCLE,
              A.LASTEXECPOSTTRADEVENUETYPE, A.PRICELEVELPOSITION,
              A.PREVREFERENCEID, A.EXPIRYTIMESTAMP, matchType,
              a.lastExecutionRole, a.MDEntryID, a.PegOffset,
              a.haltReason, A.COMPARISONPRICE, A.ENTEREDPRICETYPE,
              A.ISPEX, A.CLEARINGHANDLING, B.qsid
        FROM  tibex_Order A,
              tibex_Participant b
        WHERE a.participantID = b.participantID
          AND (A.MessageSequence, A.OrderID) IN ( SELECT MAX (C.MessageSequence), C.OrderID
               FROM tibex_Order C
                 WHERE c.LastInstRejectCode = 'OK'
                 and a.OrderID=c.OrderID
                   GROUP BY C.OrderID)
          AND a.OrderStatus IN (2,4,5,6,1,9,10)
      UNION ALL
      SELECT  A.ORDERID, A.USERORDERID, A.ORDERSIDE, A.ORDERTYPE,
              A.ORDERSTATUS, A.BOARDID, A.TIMEINFORCE, A.INSTRUMENTID,
              A.REFERENCEID, A.PRICETYPE, A.PRICE, A.AVERAGEPRICE,
              A.QUANTITY, A.MINIMUMFILL, A.DISCLOSEDQTY, A.REMAINQTY,
              A.AON, A.PARTICIPANTID, A.ACCOUNTTYPE, A.ACCOUNTNO,
              A.CLEARINGAGENCY, A.LASTINSTRESULT, A.LASTINSTMESSAGESEQUENCE,
              A.LASTEXECUTIONID, A.NOTE, A.TIMESTAMP, A.QTYFILLED, A.MEID,
              A.LASTINSTREJECTCODE, A.LASTEXECPRICE, A.LASTEXECQTY,
              A.LASTINSTTYPE, A.LASTEXECUTIONCOUNTERPARTY, A.VISIBLEQTY,
              A.STOPPRICE, A.LASTEXECCLEARINGAGENCY, A.LASTEXECACCOUNTNO,
              A.LASTEXECCPCLEARINGAGENCY, A.MESSAGESEQUENCE,
              A.LASTINSTUSERALIAS, A.BOOKTIMESTAMP, A.PARTICIPANTIDMM,
              A.MARKETSTATE, A.PARTNEREXID, A.LastExecSETTLEMENTCYCLE,
              A.LASTEXECPOSTTRADEVENUETYPE, A.PRICELEVELPOSITION,
              A.PREVREFERENCEID, A.EXPIRYTIMESTAMP, matchType,
              a.lastExecutionRole, A.MDEntryID, a.PegOffset,
              a.haltReason, A.COMPARISONPRICE, A.ENTEREDPRICETYPE,
              A.ISPEX, A.CLEARINGHANDLING, B.qsid
        FROM  tibex_Order A,
              tibex_Participant b
        WHERE a.participantID = b.participantID
          AND orderstatus=3
          AND 1 IN (
                  SELECT count(*)
                    FROM tibex_order c
                    WHERE c.orderid=a.orderid
                      AND c.instrumentID=a.instrumentID
    select * from TIBEX_ORDERSBYQSIDVIEW where participantid='NITE';
    Current SQL using Temp Segment and Look for Column TEMPSEG_SIZE_MB
           SID TIME                OPERATION                 ESIZE        MEM    MAX MEM       PASS TEMPSEG_SIZE_MB
           183 11/10/2011:13:38:44 HASH-JOIN                    43         43       1556          1            1024
           183 11/10/2011:13:38:44 GROUP BY (HASH)            2043       2072       2072          0            4541Edited by: NM on 11-Oct-2011 04:38

  • Tuning the sql query

    Hi All,
    I have query in using oracle report , its taking long time to run the report when we run for 1 month period , even its taking time trying with 1 or 2 days also .
    below is the query , here we are using most of the VIew also , please help me how to improve the perfomance of this.what needs to concentrate mainly here . please help me out. Thanks in advance.
    SELECT                                                                  
             pd.segment20 discipline,
               ppx.employee_number,
             SUBSTR (ppx.full_name, 1, 50) fullname,
               pj.NAME designation,
             horg.NAME department,
               SUM (a.measure) hours,
             d.segment1 projectnumber,
               d.NAME projectname,
               pat.task_name    
    FROM     per_analysis_criteria pd,
             per_people_x ppx,
             per_jobs_v pj,
             hr_all_organization_units horg,
             hxc_time_building_blocks a,
               pa_projects_all d,
               pa_tasks pat,
             hxc_time_attribute_usages b,
             hxc_time_attributes c,
             hxc_time_building_blocks DAY,
             hxc_time_building_blocks TIME,
             per_assignments_x pax,
             hxc_timecard_summary summary,
             per_person_analyses pe,
             per_special_info_types_v pf
       WHERE pax.organization_id  = horg.organization_id
         AND pd.id_flex_num                  = pf.id_flex_num
         AND pd.analysis_criteria_id        = pe.analysis_criteria_id
         AND pax.job_id          = pj.job_id
         AND c.attribute1        = pat.project_id
         AND c.attribute2        = pat.task_id
         AND a.time_building_block_id = b.time_building_block_id
         AND d.project_id        = c.attribute1
         AND pat.task_id         = c.attribute2
         AND b.time_attribute_id = c.time_attribute_id
         AND a.parent_building_block_id   = DAY.time_building_block_id
         AND a.parent_building_block_ovn  = DAY.object_version_number
         AND DAY.parent_building_block_id = TIME.time_building_block_id
         AND DAY.parent_building_block_ovn= TIME.object_version_number
         AND TIME.time_building_block_id  = summary.timecard_id
         AND TIME.object_version_number   = summary.timecard_ovn
         AND a.resource_id                = ppx.person_id
         AND ppx.person_id                       = pax.person_id
         AND pf.id_flex_num                  = pe.id_flex_num
         AND pe.person_id                       = ppx.person_id
         AND pf.business_group_id             = pe.business_group_id
         AND a.object_version_number        = b.time_building_block_ovn
         AND pax.primary_flag                  = 'Y'
         AND summary.approval_status        = 'APPROVED'
         AND a.SCOPE                            = 'DETAIL'
         AND pf.NAME                            = 'SEC Staff Movement'
         AND c.attribute_category             = 'PROJECTS'
         AND d.segment1 LIKE '905%'
         AND DAY.start_time                      >= :p_start_date
         AND TRUNC (DAY.stop_time, 'DD')  <= :p_end_date
         AND SYSDATE BETWEEN a.date_from    AND a.date_to
         AND SYSDATE BETWEEN DAY.date_from  AND DAY.date_to
         AND SYSDATE BETWEEN TIME.date_from AND TIME.date_to
         AND a.object_version_number =
                      (SELECT MAX (b.object_version_number)
                         FROM hxc_time_building_blocks b
                        WHERE b.time_building_block_id = a.time_building_block_id)
         AND pe.date_from = (SELECT MAX (xsm.date_from)
                               FROM xsec_staff_movement xsm
                              WHERE xsm.emp_person_id = ppx.person_id)
    GROUP BY pd.segment20,
             ppx.employee_number,
             SUBSTR (ppx.full_name, 1, 50),
             pj.NAME,
             horg.NAME,
             d.segment1,
             d.NAME,
             pat.task_name
    [\pre]
    Thanks
    RG
    Message was edited by:
            user549459                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Rob , I managed to recreate the plan table and below is the out put. please help me out
    PLAN_TABLE_OUTPUT
    | Id  | Operation                                                |  Name                          | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT                                         |                                |     1 |   573 |   383 |
    |   1 |  SORT GROUP BY                                           |                                |     1 |   573 |   380 |
    |*  2 |   FILTER                                                 |                                |       |       |       |
    |   3 |    NESTED LOOPS                                          |                                |     1 |   573 |   355 |
    |   4 |     NESTED LOOPS                                         |                                |     1 |   554 |   353 |
    |   5 |      NESTED LOOPS                                        |                                |     1 |   529 |   351 |
    |   6 |       NESTED LOOPS                                       |                                |     1 |   484 |   349 |
    |   7 |        NESTED LOOPS                                      |                                |     1 |   461 |   348 |
    |   8 |         NESTED LOOPS                                     |                                |     1 |   417 |   347 |
    |   9 |          NESTED LOOPS                                    |                                |     1 |   394 |   345 |
    |  10 |           NESTED LOOPS                                   |                                |     1 |   379 |   342 |
    |  11 |            NESTED LOOPS                                  |                                |     1 |   328 |   181 |
    |  12 |             NESTED LOOPS                                 |                                |     1 |   305 |   180 |
    |  13 |              NESTED LOOPS                                |                                |     1 |   297 |   179 |
    |  14 |               NESTED LOOPS                               |                                |     1 |   287 |   178 |
    |  15 |                NESTED LOOPS                              |                                |     1 |   256 |   177 |
    |  16 |                 NESTED LOOPS                             |                                |     1 |   215 |   173 |
    PLAN_TABLE_OUTPUT
    |  17 |                  NESTED LOOPS                            |                                |     1 |    97 |   171 |
    |  18 |                   NESTED LOOPS                           |                                |     1 |    71 |   169 |
    |* 19 |                    HASH JOIN                             |                                |     1 |    59 |     5 |
    |  20 |                     NESTED LOOPS                         |                                |     1 |    51 |     2 |
    |* 21 |                      TABLE ACCESS BY INDEX ROWID         | FND_ID_FLEX_STRUCTURES_TL      |     1 |    37 |     2 |
    |* 22 |                       INDEX RANGE SCAN                   | FND_ID_FLEX_STRUCTURES_TL_N1   |     1 |       |     1 |
    |* 23 |                      INDEX UNIQUE SCAN                   | FND_ID_FLEX_STRUCTURES_U1      |     1 |    14 |       |
    |  24 |                     TABLE ACCESS FULL                    | PER_SPECIAL_INFO_TYPES         |    45 |   360 |     2 |
    |  25 |                    TABLE ACCESS BY INDEX ROWID           | PER_ANALYSIS_CRITERIA          |  1527 | 18324 |   164 |
    |* 26 |                     INDEX RANGE SCAN                     | PER_ANALYSIS_CRITERIA_N1       |  1768 |       |     6 |
    |* 27 |                   TABLE ACCESS BY INDEX ROWID            | PER_PERSON_ANALYSES            |     1 |    26 |     2 |
    |* 28 |                    INDEX RANGE SCAN                      | PER_PERSON_ANALYSES_FK2        |     3 |       |     1 |
    |* 29 |                  TABLE ACCESS BY INDEX ROWID             | PER_ALL_PEOPLE_F               |     1 |   118 |     2 |
    |* 30 |                   INDEX RANGE SCAN                       | PER_PEOPLE_F_PK                |     1 |       |     1 |
    |  31 |                    SORT AGGREGATE                        |                                |     1 |   417 |       |
    |  32 |                     NESTED LOOPS OUTER                   |                                |     1 |   417 |    25 |
    |  33 |                      NESTED LOOPS OUTER                  |                                |     1 |   319 |    23 |
    |  34 |                       NESTED LOOPS OUTER                 |                                |     1 |   221 |    21 |
    |  35 |                        NESTED LOOPS OUTER                |                                |     1 |   217 |    21 |
    |  36 |                         NESTED LOOPS OUTER               |                                |     1 |   213 |    21 |
    |  37 |                          NESTED LOOPS OUTER              |                                |     1 |   209 |    21 |
    PLAN_TABLE_OUTPUT
    |  38 |                           NESTED LOOPS OUTER             |                                |     1 |   205 |    21 |
    |* 39 |                            HASH JOIN                     |                                |     1 |   201 |    21 |
    |  40 |                             NESTED LOOPS                 |                                |     1 |   177 |    18 |
    |  41 |                              NESTED LOOPS                |                                |     1 |    51 |    17 |
    |* 42 |                               TABLE ACCESS BY INDEX ROWID| PER_ALL_ASSIGNMENTS_F          |     1 |    33 |     5 |
    |* 43 |                                INDEX RANGE SCAN          | PER_ASSIGNMENTS_F_N12          |     3 |       |     2 |
    |  44 |                               TABLE ACCESS BY INDEX ROWID| PER_PERSON_ANALYSES            |     1 |    18 |    12 |
    |* 45 |                                INDEX RANGE SCAN          | PER_PERSON_ANALYSES_N3         |     1 |       |     1 |
    |  46 |                              TABLE ACCESS BY INDEX ROWID | PER_ANALYSIS_CRITERIA          |     1 |   126 |     1 |
    |* 47 |                               INDEX UNIQUE SCAN          | PER_ANALYSIS_CRITERIA_PK       |     1 |       |       |
    |* 48 |                             TABLE ACCESS FULL            | FND_ID_FLEX_STRUCTURES         |     1 |    24 |     2 |
    |* 49 |                            INDEX UNIQUE SCAN             | PA_TASKS_U1                    |     1 |     4 |       |
    |* 50 |                           INDEX UNIQUE SCAN              | PA_TASKS_U1                    |     1 |     4 |       |
    |* 51 |                          INDEX UNIQUE SCAN               | PA_TASKS_U1                    |     1 |     4 |       |
    |* 52 |                         INDEX UNIQUE SCAN                | PA_PROJECTS_U1                 |     1 |     4 |       |
    |* 53 |                        INDEX UNIQUE SCAN                 | PA_PROJECTS_U1                 |     1 |     4 |       |
    |* 54 |                       TABLE ACCESS BY INDEX ROWID        | PER_ALL_PEOPLE_F               |     1 |    98 |     2 |
    |* 55 |                        INDEX RANGE SCAN                  | PER_PEOPLE_F_PK                |     1 |       |     1 |
    |* 56 |                      TABLE ACCESS BY INDEX ROWID         | PER_ALL_PEOPLE_F               |     1 |    98 |     2 |
    |* 57 |                       INDEX RANGE SCAN                   | PER_PEOPLE_F_PK                |     1 |       |     1 |
    |* 58 |                 TABLE ACCESS BY INDEX ROWID              | PER_ALL_ASSIGNMENTS_F          |     1 |    41 |     4 |
    PLAN_TABLE_OUTPUT
    |* 59 |                  INDEX RANGE SCAN                        | PER_ASSIGNMENTS_F_N12          |     3 |       |     1 |
    |  60 |                TABLE ACCESS BY INDEX ROWID               | HR_ALL_ORGANIZATION_UNITS      |     1 |    31 |     1 |
    |* 61 |                 INDEX UNIQUE SCAN                        | HR_ORGANIZATION_UNITS_PK       |     1 |       |       |
    |  62 |               TABLE ACCESS BY INDEX ROWID                | PER_JOBS                       |     1 |    10 |     1 |
    |* 63 |                INDEX UNIQUE SCAN                         | PER_JOBS_PK                    |     1 |       |       |
    |* 64 |              TABLE ACCESS BY INDEX ROWID                 | PER_JOB_GROUPS                 |     1 |     8 |     1 |
    |* 65 |               INDEX UNIQUE SCAN                          | PER_JOB_GROUPS_PK              |     1 |       |       |
    |  66 |             TABLE ACCESS BY INDEX ROWID                  | PER_JOBS_TL                    |     1 |    23 |     1 |
    |* 67 |              INDEX UNIQUE SCAN                           | PER_JOBS_TL_PK                 |     1 |       |       |
    |* 68 |            TABLE ACCESS BY INDEX ROWID                   | HXC_TIME_BUILDING_BLOCKS       |     8 |   408 |   161 |
    |* 69 |             INDEX RANGE SCAN                             | HXC_TIME_BUILDING_BLOCKS_FK2   |   543 |       |     5 |
    |  70 |           TABLE ACCESS BY INDEX ROWID                    | HXC_TIME_ATTRIBUTE_USAGES      |     1 |    15 |     3 |
    |* 71 |            INDEX RANGE SCAN                              | HXC_TIME_ATTRIBUTE_USAGES_FK2  |     1 |       |     2 |
    |* 72 |          TABLE ACCESS BY INDEX ROWID                     | HXC_TIME_ATTRIBUTES            |     1 |    23 |     2 |
    |* 73 |           INDEX UNIQUE SCAN                              | HXC_TIME_ATTRIBUTES_PK         |     1 |       |     1 |
    |* 74 |         TABLE ACCESS BY INDEX ROWID                      | PA_PROJECTS_ALL                |     1 |    44 |     1 |
    |* 75 |          INDEX UNIQUE SCAN                               | PA_PROJECTS_U1                 |     1 |       |       |
    |* 76 |        TABLE ACCESS BY INDEX ROWID                       | PA_TASKS                       |     1 |    23 |     1 |
    |* 77 |         INDEX UNIQUE SCAN                                | PA_TASKS_U1                    |     1 |       |       |
    |* 78 |       TABLE ACCESS BY INDEX ROWID                        | HXC_TIME_BUILDING_BLOCKS       |     1 |    45 |     2 |
    |* 79 |        INDEX UNIQUE SCAN                                 | HXC_TIME_BUILDING_BLOCKS_PK    |     1 |       |     1 |
    PLAN_TABLE_OUTPUT
    |* 80 |      TABLE ACCESS BY INDEX ROWID                         | HXC_TIME_BUILDING_BLOCKS       |     1 |    25 |     2 |
    |* 81 |       INDEX UNIQUE SCAN                                  | HXC_TIME_BUILDING_BLOCKS_PK    |     1 |       |     1 |
    |* 82 |     TABLE ACCESS BY INDEX ROWID                          | HXC_TIMECARD_SUMMARY           |     1 |    19 |     2 |
    |* 83 |      INDEX UNIQUE SCAN                                   | HXC_TIMECARD_SUMMARY_PK        |     1 |       |     1 |
    |  84 |    SORT AGGREGATE                                        |                                |     1 |     9 |       |
    |  85 |     FIRST ROW                                            |                                |     1 |     9 |     3 |
    |* 86 |      INDEX RANGE SCAN (MIN/MAX)                          | HXC_TIME_BUILDING_BLOCKS_PK    |    10M|       |     3 |
    Predicate Information (identified by operation id):
       2 - filter("SYS_ALIAS_1"."OBJECT_VERSION_NUMBER"= (SELECT /*+ */ MAX("B"."OBJECT_VERSION_NUMBER")
                  "HXC"."HXC_TIME_BUILDING_BLOCKS" "B" WHERE "B"."TIME_BUILDING_BLOCK_ID"=:B1))
      19 - access("X"."ID_FLEX_NUM"="B"."ID_FLEX_NUM")
      21 - filter("T"."ID_FLEX_CODE"='PEA')
      22 - access("T"."ID_FLEX_STRUCTURE_NAME"='SEC Staff Movement' AND "T"."LANGUAGE"=:B1)
      23 - access("B"."APPLICATION_ID"="T"."APPLICATION_ID" AND "B"."ID_FLEX_CODE"="T"."ID_FLEX_CODE" AN
                  "B"."ID_FLEX_NUM"="T"."ID_FLEX_NUM")
           filter("B"."ID_FLEX_CODE"='PEA')
      26 - access("PD"."ID_FLEX_NUM"="X"."ID_FLEX_NUM")
    PLAN_TABLE_OUTPUT
      27 - filter("X"."ID_FLEX_NUM"="PE"."ID_FLEX_NUM" AND "X"."BUSINESS_GROUP_ID"="PE"."BUSINESS_GROUP_
      28 - access("PD"."ANALYSIS_CRITERIA_ID"="PE"."ANALYSIS_CRITERIA_ID")
      29 - filter(DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),'Y','TRUE',"APPS"."HR_SECURITY"."SHOW_PERSON"
                  ID","SYS_ALIAS_2"."CURRENT_APPLICANT_FLAG","SYS_ALIAS_2"."CURRENT_EMPLOYEE_FLAG","SYS_ALIAS_2
                  S_2"."EMPLOYEE_NUMBER","SYS_ALIAS_2"."APPLICANT_NUMBER","SYS_ALIAS_2"."NPW_NUMBER"))='TRUE' A
                  "SYS_ALIAS_2"."BUSINESS_GROUP_ID"=DECODE("APPS"."HR_GENERAL"."GET_XBG_PROFILE"(),'Y',"SYS_ALI
                  S"."HR_GENERAL"."GET_BUSINESS_GROUP_ID"()))
      30 - access("PE"."PERSON_ID"="SYS_ALIAS_2"."PERSON_ID" AND "SYS_ALIAS_2"."EFFECTIVE_END_DATE">=TRU
                  "SYS_ALIAS_2"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!))
           filter("SYS_ALIAS_2"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!) AND
                  "SYS_ALIAS_2"."EFFECTIVE_END_DATE">=TRUNC(SYSDATE@!) AND "PE"."DATE_FROM"= (SELECT /*+ */ MAX
                  "PA"."PA_TASKS" "PAT3","PA"."PA_TASKS" "PAT2","PA"."PA_TASKS" "PAT1","HR"."PER_ALL_PEOPLE_F"
                  "PAP","PA"."PA_PROJECTS_ALL" "PAP2","PA"."PA_PROJECTS_ALL" "PAP1","APPLSYS"."FND_ID_FLEX_STRU
                  "D","HR"."PER_ALL_ASSIGNMENTS_F" "PAA","HR"."PER_PERSON_ANALYSES" "B","HR"."PER_ANALYSIS_CRIT
                  "A"."ANALYSIS_CRITERIA_ID"="B"."ANALYSIS_CRITERIA_ID" AND "B"."PERSON_ID"="PAA"."PERSON_ID" A
                  "PAA"."PERSON_ID"=:B2 AND "PAA"."PRIMARY_FLAG"='Y' AND DECODE("APPS"."HR_SECURITY"."VIEW_ALL"
                  ITY"."SHOW_RECORD"('PER_ALL_ASSIGNMENTS_F',"PAA"."ASSIGNMENT_ID",TO_CHAR("PAA"."PERSON_ID"),"
                  ' AND "PAA"."BUSINESS_GROUP_ID"=DECODE("APPS"."HR_GENERAL"."GET_XBG_PROFILE"(),'Y',"PAA"."BUS
                  ERAL"."GET_BUSINESS_GROUP_ID"()) AND "PAA"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!) AND
                  "PAA"."EFFECTIVE_END_DATE">=TRUNC(SYSDATE@!) AND "A"."ID_FLEX_NUM"="D"."ID_FLEX_NUM" AND
                  "D"."ID_FLEX_STRUCTURE_CODE"='SEC_STAFF_MOVEMENT' AND "PAP1"."PROJECT_ID"(+)=TO_NUMBER("A"."S
    PLAN_TABLE_OUTPUT
                  "PAP2"."PROJECT_ID"(+)=TO_NUMBER("A"."SEGMENT3") AND "PAP"."PERSON_ID"(+)=TO_NUMBER("A"."SEGM
                  DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),'Y','TRUE',"APPS"."HR_SECURITY"."SHOW_PERSON"("PAP".
                  APPLICANT_FLAG"(+),"PAP"."CURRENT_EMPLOYEE_FLAG"(+),"PAP"."CURRENT_NPW_FLAG"(+),"PAP"."EMPLOY
                  NUMBER"(+),"PAP"."NPWNUMBER"(+)))='TRUE' AND "PAP"."BUSINESS_GROUP_ID"(+)=DECODE("APPS"."HR
                  'Y',"PAP"."BUSINESS_GROUP_ID"(+),"APPS"."HR_GENERAL"."GET_BUSINESS_GROUP_ID"()) AND
                  "PAP"."EFFECTIVE_START_DATE"(+)<=TRUNC(SYSDATE@!) AND "PAP"."EFFECTIVE_END_DATE"(+)>=TRUNC(SY
                  "PAP"."PERSON_ID"(+)=TO_NUMBER("A"."SEGMENT11") AND DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),
                  "."SHOW_PERSON"("PAP"."PERSON_ID"(+),"PAP"."CURRENT_APPLICANT_FLAG"(+),"PAP"."CURRENT_EMPLOYE
                  FLAG"(+),"PAP"."EMPLOYEE_NUMBER"(+),"PAP"."APPLICANT_NUMBER"(+),"PAP"."NPW_NUMBER"(+)))='TRUE
                  "PAP"."BUSINESS_GROUP_ID"(+)=DECODE("APPS"."HR_GENERAL"."GET_XBG_PROFILE"(),'Y',"PAP"."BUSINE
                  ERAL"."GET_BUSINESS_GROUP_ID"()) AND "PAP"."EFFECTIVE_START_DATE"(+)<=TRUNC(SYSDATE@!) AND
                  "PAP"."EFFECTIVE_END_DATE"(+)>=TRUNC(SYSDATE@!) AND "PAT1"."TASK_ID"(+)=TO_NUMBER("A"."SEGMEN
                  "PAT2"."TASK_ID"(+)=TO_NUMBER("A"."SEGMENT18") AND "PAT3"."TASK_ID"(+)=TO_NUMBER("A"."SEGMENT
      39 - access("A"."ID_FLEX_NUM"="D"."ID_FLEX_NUM")
      42 - filter("PAA"."PRIMARY_FLAG"='Y' AND DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),'Y','TRUE',"APPS
                  ECORD"('PER_ALL_ASSIGNMENTS_F',"PAA"."ASSIGNMENT_ID",TO_CHAR("PAA"."PERSON_ID"),"PAA"."ASSIGN
                  "PAA"."BUSINESS_GROUP_ID"=DECODE("APPS"."HR_GENERAL"."GET_XBG_PROFILE"(),'Y',"PAA"."BUSINESS_
                  "GET_BUSINESS_GROUP_ID"()))
      43 - access("PAA"."PERSON_ID"=:B1 AND "PAA"."EFFECTIVE_END_DATE">=TRUNC(SYSDATE@!) AND
                  "PAA"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!))
           filter("PAA"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!) AND "PAA"."EFFECTIVE_END_DATE">=TRUNC(S
    PLAN_TABLE_OUTPUT
      45 - access("B"."PERSON_ID"="PAA"."PERSON_ID")
           filter("B"."PERSON_ID"=:B1)
      47 - access("A"."ANALYSIS_CRITERIA_ID"="B"."ANALYSIS_CRITERIA_ID")
      48 - filter("D"."ID_FLEX_STRUCTURE_CODE"='SEC_STAFF_MOVEMENT')
      49 - access("PAT3"."TASK_ID"(+)=TO_NUMBER("A"."SEGMENT21"))
      50 - access("PAT2"."TASK_ID"(+)=TO_NUMBER("A"."SEGMENT18"))
      51 - access("PAT1"."TASK_ID"(+)=TO_NUMBER("A"."SEGMENT2"))
      52 - access("PAP2"."PROJECT_ID"(+)=TO_NUMBER("A"."SEGMENT3"))
      53 - access("PAP1"."PROJECT_ID"(+)=TO_NUMBER("A"."SEGMENT1"))
      54 - filter(DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),'Y','TRUE',"APPS"."HR_SECURITY"."SHOW_PERSON"
                  PAP"."CURRENT_APPLICANT_FLAG"(+),"PAP"."CURRENT_EMPLOYEE_FLAG"(+),"PAP"."CURRENT_NPW_FLAG"(+)
                  AP"."APPLICANT_NUMBER"(+),"PAP"."NPW_NUMBER"(+)))='TRUE' AND "PAP"."BUSINESS_GROUP_ID"(+)=DEC
                  BG_PROFILE"(),'Y',"PAP"."BUSINESS_GROUP_ID"(+),"APPS"."HR_GENERAL"."GET_BUSINESS_GROUP_ID"())
      55 - access("PAP"."PERSON_ID"(+)=TO_NUMBER("A"."SEGMENT11") AND "PAP"."EFFECTIVE_END_DATE"(+)>=TRU
                  "PAP"."EFFECTIVE_START_DATE"(+)<=TRUNC(SYSDATE@!))
           filter("PAP"."EFFECTIVE_START_DATE"(+)<=TRUNC(SYSDATE@!) AND "PAP"."EFFECTIVE_END_DATE"(+)>=T
      56 - filter(DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),'Y','TRUE',"APPS"."HR_SECURITY"."SHOW_PERSON"
                  PAP"."CURRENT_APPLICANT_FLAG"(+),"PAP"."CURRENT_EMPLOYEE_FLAG"(+),"PAP"."CURRENT_NPW_FLAG"(+)
                  AP"."APPLICANT_NUMBER"(+),"PAP"."NPW_NUMBER"(+)))='TRUE' AND "PAP"."BUSINESS_GROUP_ID"(+)=DEC
                  BG_PROFILE"(),'Y',"PAP"."BUSINESS_GROUP_ID"(+),"APPS"."HR_GENERAL"."GET_BUSINESS_GROUP_ID"())
      57 - access("PAP"."PERSON_ID"(+)=TO_NUMBER("A"."SEGMENT4") AND "PAP"."EFFECTIVE_END_DATE"(+)>=TRUN
    PLAN_TABLE_OUTPUT
                  "PAP"."EFFECTIVE_START_DATE"(+)<=TRUNC(SYSDATE@!))
           filter("PAP"."EFFECTIVE_START_DATE"(+)<=TRUNC(SYSDATE@!) AND "PAP"."EFFECTIVE_END_DATE"(+)>=T
      58 - filter("PAA"."PRIMARY_FLAG"='Y' AND DECODE("APPS"."HR_SECURITY"."VIEW_ALL"(),'Y','TRUE',"APPS
                  ECORD"('PER_ALL_ASSIGNMENTS_F',"PAA"."ASSIGNMENT_ID",TO_CHAR("PAA"."PERSON_ID"),"PAA"."ASSIGN
                  "PAA"."BUSINESS_GROUP_ID"=DECODE("APPS"."HR_GENERAL"."GET_XBG_PROFILE"(),'Y',"PAA"."BUSINESS_
                  "GET_BUSINESS_GROUP_ID"()))
      59 - access("SYS_ALIAS_2"."PERSON_ID"="PAA"."PERSON_ID" AND "PAA"."EFFECTIVE_END_DATE">=TRUNC(SYSD
                  "PAA"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!))
           filter("PAA"."EFFECTIVE_START_DATE"<=TRUNC(SYSDATE@!) AND "PAA"."EFFECTIVE_END_DATE">=TRUNC(S
      61 - access("PAA"."ORGANIZATION_ID"="HORG"."ORGANIZATION_ID")
      63 - access("PAA"."JOB_ID"="JOB"."JOB_ID")
      64 - filter("JGR"."INTERNAL_NAME"='HR_'||TO_CHAR("JOB"."BUSINESS_GROUP_ID"))
      65 - access("JOB"."JOB_GROUP_ID"="JGR"."JOB_GROUP_ID")
      67 - access("JBT"."JOB_ID"="JOB"."JOB_ID" AND "JBT"."LANGUAGE"=:B1)
      68 - filter("SYS_ALIAS_1"."PARENT_BUILDING_BLOCK_ID" IS NOT NULL AND "SYS_ALIAS_1"."PARENT_BUILDIN
                  NULL AND "SYS_ALIAS_1"."DATE_FROM"<=SYSDATE@! AND "SYS_ALIAS_1"."DATE_TO">=SYSDATE@!)
      69 - access("SYS_ALIAS_1"."RESOURCE_ID"="SYS_ALIAS_2"."PERSON_ID" AND "SYS_ALIAS_1"."SCOPE"='DETAI
      71 - access("SYS_ALIAS_1"."TIME_BUILDING_BLOCK_ID"="B"."TIME_BUILDING_BLOCK_ID" AND
                  "SYS_ALIAS_1"."OBJECT_VERSION_NUMBER"="B"."TIME_BUILDING_BLOCK_OVN")
      72 - filter("C"."ATTRIBUTE_CATEGORY"='PROJECTS')
      73 - access("B"."TIME_ATTRIBUTE_ID"="C"."TIME_ATTRIBUTE_ID")
    PLAN_TABLE_OUTPUT
      74 - filter("D"."SEGMENT1" LIKE '905%')
      75 - access("D"."PROJECT_ID"=TO_NUMBER("C"."ATTRIBUTE1"))
      76 - filter("PAT"."PROJECT_ID"=TO_NUMBER("C"."ATTRIBUTE1"))
      77 - access("PAT"."TASK_ID"=TO_NUMBER("C"."ATTRIBUTE2"))
      78 - filter("DAY"."PARENT_BUILDING_BLOCK_ID" IS NOT NULL AND "DAY"."PARENT_BUILDING_BLOCK_OVN" IS
                  "DAY"."START_TIME">=:Z AND TRUNC("DAY"."STOP_TIME",'fmdd')<=:Z AND "DAY"."DATE_FROM"<=SYSDATE
                  "DAY"."DATE_TO">=SYSDATE@!)
      79 - access("SYS_ALIAS_1"."PARENT_BUILDING_BLOCK_ID"="DAY"."TIME_BUILDING_BLOCK_ID" AND
                  "SYS_ALIAS_1"."PARENT_BUILDING_BLOCK_OVN"="DAY"."OBJECT_VERSION_NUMBER")
      80 - filter("TIME"."DATE_FROM"<=SYSDATE@! AND "TIME"."DATE_TO">=SYSDATE@!)
      81 - access("DAY"."PARENT_BUILDING_BLOCK_ID"="TIME"."TIME_BUILDING_BLOCK_ID" AND
                  "DAY"."PARENT_BUILDING_BLOCK_OVN"="TIME"."OBJECT_VERSION_NUMBER")
      82 - filter("TIME"."OBJECT_VERSION_NUMBER"="SUMMARY"."TIMECARD_OVN" AND "SUMMARY"."APPROVAL_STATUS
      83 - access("TIME"."TIME_BUILDING_BLOCK_ID"="SUMMARY"."TIMECARD_ID")
      86 - access("B"."TIME_BUILDING_BLOCK_ID"=:B1)
    [\pre]
    Note: cpu costing is off
    Message was edited by:
            user549459                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

  • FIne Tuning the Cisco Prime Alarms

    HI Expert,
    One of our client having Cisco Wireless LAN infrastructure with Cisco Prime. Currently they are getting more alarms (minor) on their environment.
    They would like to modify the Alarm pattern / threshold to minimise the Alarms pop-up in prime. Could you please advise me how we can modify this ?
    Also do  Cisco having any documents for how to  fine tune ? 
    Thank you.
    -Ananthan

    Hi 
    Here's the document for the customization of alarms.
    Configuring Alarm Severity Levels
    A newly generated alarm has a default severity level that you might want to change.
    To configure an alarm’s severity level, follow these steps:
    Step 1 Choose Administration > System Settings.
    Step 2 From the left sidebar menu, choose Severity Configuration.
    Step 3 Select the check box of the alarm condition whose severity level that you want to change.
    Step 4 From the Configure Security Level drop-down list, choose a severity level, then click Go.
    Step 5 Click OK to confirm the changes.
    Configuring Alarm Severity Levels
    http://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/infrastructure/2-2/user/guide/pi_ug/alarms.html#pgfId-1054721
    - Ashok
    Please rate the useful post or mark as correct answer as it will help others looking for similar information

  • Fine tuning the cursor

    I am using two cursors in my Pro*C applicatioin
    exec sql declare cur_open_act cursor for
    select distinct d.member_number,
    a.account_number,
    a.registration_type,
    f.registration_desc,
    a.office_code,
    a.open_flag,
    a.date_opened,
    a.state,
    a.restriction_code,
    a.restriction_date,
    nvl(c.book_shares, 0) +
    nvl(c.memo_book_shares, 0) +
    nvl(b.non_company_sweep_balance, 0) +
    nvl(a.cash_td_balance, 0) +
    nvl(a.cash_sd_balance, 0) +
    nvl(a.margin_td_balance, 0) +
    nvl(a.margin_sd_balance, 0)
    ) as balance
    from br_accounts a,
    (select account_number,
    sum(sweep_td_balance) non_company_sweep_balance
    from br_sweep_accounts
    group by account_number) b,
    stars_accounts c,
    br_member_accounts d,
    br_office_codes e,
    company_registration_types f
    where a.account_number = b.account_number (+)
    and a.account_number = d.account_number
    and a.sweep_fund_number = c.fund_number (+)
    and a.sweep_account_number = c.account_number (+)
    and a.registration_type = f.registration_type (+)
    and a.office_code = e.office_code
    and a.open_flag='Y'
    and d.relationship_code in ('PRI','RET','TTE')
    and e.managed_product_ind != 'Y';
    exec sql declare cur_close_act cursor for
    select distinct d.member_number,
    a.account_number,
    a.registration_type,
    f.registration_desc,
    a.office_code,
    a.open_flag,
    a.date_opened,
    a.state,
    a.restriction_code,
    a.restriction_date,
    nvl(c.book_shares, 0) +
    nvl(c.memo_book_shares, 0) +
    nvl(b.non_company_sweep_balance, 0) +
    nvl(a.cash_td_balance, 0) +
    nvl(a.cash_sd_balance, 0) +
    nvl(a.margin_td_balance, 0) +
    nvl(a.margin_sd_balance, 0)
    ) as balance
    from br_accounts a,
    (select account_number,
    sum(sweep_td_balance) non_company_sweep_balance
    from br_sweep_accounts
    group by account_number) b,
    stars_accounts c,
    br_member_accounts d,
    br_office_codes e,
    company_registration_types f
    where a.account_number = b.account_number (+)
    and a.account_number = d.account_number
    and a.sweep_fund_number = c.fund_number (+)
    and a.sweep_account_number = c.account_number (+)
    and a.registration_type = f.registration_type (+)
    and a.office_code = e.office_code
    and a.open_flag='N'
    and d.relationship_code in ('PRI','RET','TTE')is
    and e.managed_product_ind != 'Y'
    and (
    nvl(c.book_shares, 0) +
    nvl(c.memo_book_shares, 0) +
    nvl(b.non_company_sweep_balance, 0) +
    nvl(a.cash_td_balance, 0) +
    nvl(a.cash_sd_balance, 0) +
    nvl(a.margin_td_balance, 0) +
    nvl(a.margin_sd_balance, 0)
    ) != 0;
    The query used is redundant for the most part and is shown below
    select distinct d.member_number,
    a.account_number,
    a.registration_type,
    f.registration_desc,
    a.office_code,
    a.open_flag,
    a.date_opened,
    a.state,
    a.restriction_code,
    a.restriction_date,
    nvl(c.book_shares, 0) +
    nvl(c.memo_book_shares, 0) +
    nvl(b.non_company_sweep_balance, 0) +
    nvl(a.cash_td_balance, 0) +
    nvl(a.cash_sd_balance, 0) +
    nvl(a.margin_td_balance, 0) +
    nvl(a.margin_sd_balance, 0)
    ) as balance
    from br_accounts a,
    (select account_number,
    sum(sweep_td_balance) non_company_sweep_balance
    from br_sweep_accounts
    group by account_number) b,
    stars_accounts c,
    br_member_accounts d,
    br_office_codes e,
    company_registration_types f
    where a.account_number = b.account_number (+)
    and a.account_number = d.account_number
    and a.sweep_fund_number = c.fund_number (+)
    and a.sweep_account_number = c.account_number (+)
    and a.registration_type = f.registration_type (+)
    and a.office_code = e.office_code
    and d.relationship_code in ('PRI','RET','TTE')is
    and e.managed_product_ind != 'Y'
    Is there a more efficient way other than using 2 separate cursors?
    I don't want to use the redundant portion as a single cursor since it affects the performance.
    Edited by: user9285722 on Apr 1, 2011 4:43 PM

    Hi,
    Why dont you just use the 1st cursor and along with what you do with the first cursor, if balance!=0 then do what you do with second cursor.
    I dont know how you do in pro*c, but here is the algorithm.
    open cur_open_act;
    loop
    -- Do your operations that you do with cursor1.
    ---Now along with that
    IF cur_open_act.balance != 0 then
    ----- Do your operations that you do with cursor2.
    END IF;
    end loop;G.

  • Fine-tuning the appearance of JFileChooser

    I have what I hope is a simple question:
    I'm creating a customized JFileChooser. One of the cool things it does is it displays its own custom icons for the files. These icons are a bit bigger than the standard icons for my look-and-feel (Linux default LandF, whatever that is, in Java 1.5). These icons are about 45 pixels high. They look GREAT when viewing in the "icon" view, but when the user switches to the "list" view, they draw on top of eachother. Somehow JFileChooser doesn't know to leave more space.
    Any suggestions on this?
    And the other question, which I'm sure is a FAQ but I can't find it: I also have a file filter on this JFileChooser, and yet it gives the user the option of changing to "view any file type". Is there a way to turn that off? I really want to constrain what my users are doing.
    Thanks

    hi leena,
    Look into these threads...
    https://www.sdn.sap.com/irj/sdn/thread?threadID=119605
    https://www.sdn.sap.com/irj/sdn/thread?threadID=101325
    Also see,
    <a href="https://websmp103.sap-ag.de/~form/sapnet?_SHORTKEY=00200797470000073623&_OBJECT=011000358700001480992005E">this link</a>
    https://media.sdn.sap.com/public/eclasses/bwp04/PortalTuning_files/Default.htm
    Regs,
    jaga
    Message was edited by: jagadeep sampath

Maybe you are looking for