Where is the Query overall performance is checked??

Hello BW Experts,
Where is the Overall Query Performance can be checked??
Is it:
1.RSMO
2.RSBBM
3.SU01
4.Table RSDDSTAT(something like this, if its not correct)
Plz throw some light on this also <u>plz explain what and all could actually be checked or verified</u> in that!!
Thanks and regrads,
Sapster.
<i>I always assign points.</i>

Hi,
RSRT is the one transaction to check query performance (pls correct if iam wrong!)
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
here is the docu abt the query performance.
hope this helps.
thanks & regards,
LS.

Similar Messages

  • Pls help me to modify the query for performance improvement

    Hi,
    I have the below initialization
    DECLARE @Active bit =1 ;
    Declare @id int
    SELECT @Active=CASE WHEN id=@id and [Rank] ='Good' then 0 else 1 END  FROM dbo.Students
    I have to change this query in such a way that the conditions id=@id and [Rank] ='Good' should go to the where condition of the query. In that case, how can i use Case statement to retrieve 1 or 0? Can you please help me to modify this initialization?

    I dont understand your query...May be below? or provide us sample data and your output...
    SELECT *  FROM dbo.students
    where @Active=CASE
    WHEN id=@id and rank ='Good' then 0 else 1 END
    But, I doubt you will have performance improvement here?
    Do you have index on id?
    If you are looking for getting the data for @ID with rank ='Good' then use the below:Make sure, you have index on id,rank combination.
    SELECT *  FROM dbo.students
    where  id=@id
    and rank ='Good' 

  • The query is performing very very slow, can any one please help me tue this

    SELECT h.ROWID row_id, e.preparer_user_id
    FROM arsarc.ars_sv_reconciliation e,
    arsarc.ars_sv_reconciliation_accts a,
    arsarc.ars_sv_acct_status_history h
    WHERE e.rec_id = :b1
    AND e.rec_id = a.rec_id
    AND e.ledger_id = h.ledger_id
    AND a.ccid = h.ccid
    AND e.preparer_user_id <> h.preparer_user_id
    AND h.fiscal_year + h.fiscal_period >= e.fiscal_year + e.fiscal_period
    PLAN_TABLE_OUTPUT
    Plan hash value: 2851427911
    | Id  | Operation                     | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT              |                                |    60 |  7740 |  6282  (11)| 00:00:08 |
    |*  1 |  HASH JOIN                    |                                |    60 |  7740 |  6282  (11)| 00:00:08 |
    |*  2 |   INDEX RANGE SCAN            | PK_RECONCILIATION_ACCTS        |   104 |  4160 |     3   (0)| 00:00:01 |
    |   3 |   NESTED LOOPS                |                                |   178K|    15M|  6243  (10)| 00:00:08 |
    |   4 |    TABLE ACCESS BY INDEX ROWID| ARS_SV_RECONCILIATION          |     1 |    23 |     2   (0)| 00:00:01 |
    |*  5 |     INDEX UNIQUE SCAN         | PK_ARS_SV_RECONCILIATION       |     1 |       |     1   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |*  6 |    TABLE ACCESS BY INDEX ROWID| ARS_SV_ACCT_STATUS_HISTORY     |   178K|    11M|  6241  (10)| 00:00:08 |
    |*  7 |     INDEX RANGE SCAN          | ARS_SV_ACCT_STATUS_HISTORY$LPY | 62094 |       |  5243  (11)| 00:00:07 |
    Predicate Information (identified by operation id):
       1 - access("A"."CCID"="H"."CCID")
       2 - access("A"."REC_ID"=TO_NUMBER(:B1))
       5 - access("E"."REC_ID"=TO_NUMBER(:B1))
       6 - filter("E"."PREPARER_USER_ID"<>"H"."PREPARER_USER_ID")
    PLAN_TABLE_OUTPUT
       7 - access("E"."LEDGER_ID"="H"."LEDGER_ID")
           filter("H"."FISCAL_YEAR"+"H"."FISCAL_PERIOD">="E"."FISCAL_YEAR"+"E"."FISCAL_PERIOD")

    Hi,
    the plan isn't showing any problem (the cost isn't high) so it's not possible to use it to troublehshoot the query. Please provide more information: 4-digit Oracle version, and depending on the version, either SQL real-time monitor report or dbms_xplan output with rowsource stats (option "iostats last" after running your sql with ALTER SESSION SET STATISTICS_LEVEL = ALL).
    Also, when reporting a performance problem it would be wise to avoid expressions like "very, very slow" replacing them with something more useful like "my query is taking 2.5 hours to retrieve 30k rows".
    Best regards,
    Nikolay

  • Improve the query's performance

    Hi Guys,
    I'm an Oracle beginner and I'm getting the following issue:
    I have to run a query with a join between two tables, let me say A and B.
    The table A has 10 Milions of records (800MB) and is indexed on two columns (a1 and a2).
    The table B has 100000 records (64MB) no index.
    The query is:
    select
    A.a1,
    A.a2,
    B.b1
    from A,B
    where A.a1 >= B.b1 and A.a2<=B.b1
    The problem is that it is really slow (more that 1 day) although the execution plan used is NESTED LOOPS.
    How can I improve the performance of this query?
    Please help me,
    GF

    Hi Guys,
    First of all thank you very much for your prompt response.
    devmiral your advise could help me. I have just realized that the statistic have never been updated.
    I'll try to update it and let you know.
    Eric here is an quick example:
    Table A Table B
    a2 a1 a3 b1
    10 14 1 10
    15 16 2 11
    18 19 3 15
    20 21 4
    The query is:
    select
    A.a2,
    A.a1,
    A.a3,
    B.b1
    from A,B
    where A.a1 >= B.b1 and A.a2<=B.b1
    The output expected should be:
    a2 a1 a3 b1
    10 14 1 10
    10 14 1 11
    15 16 2 15
    Thank you
    GF

  • How will the query improve performance when we use hint index_ss

    hi,
    I got a SQLquery from our Reports team. initially when I ran the query it took long time and I tuned the query using SQL TOAD optimizer ..I ran the tuned query and it fetched the rows faster than the last one. I observed that a new Hint was added to that query. Index_ss+ > can some explain me how this index_ss increase the performance with an example

    As always the online documentation (at http://tahiti.oracle.com) comes with the answer.
    Sadly you need an extra pair of voluntary fingers to search and read it.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements006.htm#SQLRF50415
    Sybrand Bakker
    Senior Oracle DBA

  • Where is the query window in SSMSE 2008 Express?

    I have been trying to find the query window in SQL Server 2008 Express.  I've been using SSMSE 2005 Express from a Start Menu button called "SQL Server Management Studio Express."  So far I have installed
    Microsoft SQL Server 2008 R2 RTM - Express with Management Tools, and also
    Microsoft® SQL Server® 2008 Management Studio Express, and finally
    SQL Server 2008 Express Service Pack 3.  These are all the "86" installs for Windows 7, 32-bit, for example "SQLManagementStudio_x86_ENU.exe." 
    However I still can't find a button to open an application that will allow me to run queries.  All the Start Menu buttons I have now are Microsoft SQL Server 2008 - Configuration Tools, Microsoft SQL Server 2008 R2 - Import and Export Data (32-bit), and
    Microsoft SQL Server 2008 R2 - Configuration Tools.  The "Installed SQL Server features discovery report" shows nothing installed, but I've seen others say the same thing, so I'm not sure that's even working properly. 
    All I'm really trying to do is connect to a pre-existing SQL Server 2008 database on another server from my computer, and bounce SQL queries off of it.  Also it would be nice if there were an "Enterprise Manager" application such as I used to
    have with SQL Server 2000 that would actually graphically help write the queries. 
    Can somebody help me unwind this?  Thank you.
     

    I finally got this working.  I believe the problem was that I really was not running the installation as an administrator, when I thought that I was.  All is working fine now.
    Having said that, this is a very strange installation.  There are many versions and service packs to versions.  It's difficult to understand what is even needed.  At one point the only update allowed was if I installed SDK, which I don't think
    I needed.  After updating service packs, none of the version information seemed to change.  Installation was something of a shotgun technique; just keep throwing things at it until it works.  The strange thing to me is knowing how much work
    must go into writing all of these programs, and then finding installation to be such a muddled process.
    In the end, I'll take whatever works.  Thanks to those who tried to assist.

  • Need help in fixing the query for performance reasons

    hi
    I have a view in which I am calling a function to return some values I wand to get rid of the function and want to some how do all in the sql. Can I use case or something similar that will help me in avoiding the use of this function. Any help in this regard will highly be appreciated.
    Query
    SELECT SUBSTR(f_type_px17(ap.cidn,ap.currentstatusoid, 'DESC'), 1, 255)
                        from
                             px17_appointment ap,
                             /*context co_ap,*/
                             px17_payrollagreement pa,
                             px17_payrollgroup pg;
    FUNCTION
    CREATE OR REPLACE FUNCTION f_type_px17
    fv_cidn IN px17_type_client.cidn%TYPE,
    fv_oid IN px17_type_client.oid%TYPE,
    fv_col IN VARCHAR2 DEFAULT NULL
    ) RETURN VARCHAR2 AUTHID CURRENT_USER AS
    v_rtn_name px17_type_client.name%TYPE := NULL ;
    v_rtn_desc px17_type_client.description%TYPE := NULL ;
    BEGIN
    IF fv_oid IS NOT NULL THEN
    BEGIN
    IF UPPER(SUBSTR(fv_oid,1,3)) = 'SYS' THEN
    SELECT name, description
    INTO v_rtn_name, v_rtn_desc
    FROM px17_sys_type
    WHERE oid = fv_oid
    AND ROWNUM = 1 ;
    ELSE
    SELECT name, description
    INTO v_rtn_name, v_rtn_desc
    FROM px17_type_client
    WHERE oid = fv_oid
         AND cidn = fv_cidn
    AND ROWNUM = 1 ;
    END IF ;
    EXCEPTION
    WHEN no_data_found THEN
    v_rtn_name := NULL ;
    v_rtn_desc := NULL ;
    END ;
    END IF ;
    IF (UPPER(NVL(fv_col, '~')) = 'NAME') THEN
    RETURN v_rtn_name ;
    ELSIF ((UPPER(NVL(fv_col, '~')) = 'DESC')
    OR (UPPER(NVL(fv_col, '~')) = 'DESCRIPTION')) THEN
    RETURN v_rtn_desc ;
    ELSE
    RETURN (NVL(v_rtn_name, CHR(155)) || '~' || NVL(v_rtn_desc, CHR(155))) ;
    END IF ;
    END f_type_px17 ;
    /

    Well following is the whole code of a view and the functions releated, This will give you the whole picture and this query is running for long time.
    create or replace view PX17_CHK_VW_SUMMARY_VW
    (CIDN,BATCH_NUMBER, BUSINESS_UNIT, CHECK_VOUCHER_NUMBER, CHECK_VOUCHER_CODE, CHECKVIEW_CLOCK_NUMBER,
    COMPANY_CHECKVIEW_HOME_DEPT, PERIOD_END_DATE, FEDERAL_TAX, GROSS_PAY, HOME_DEPARTMENT,
    HOME_DEPARTMENT_DESC, LIVED_LOCAL_TAX_CODE, LIVED_STATE_TAX_CODE, LIVED_LOCAL_TAX, LIVED_STATE_TAX,
    MEDICARE_TAX, NET_PAY, DEPARTMENT_WORKED_IN, PAY_TO_COMPANY_INDICATOR, PAY_DATE,
    PAYROLL_NUMBER, SCHOOL_DISTRICT_TAX, CHECKVIEW_SCHOOL_DISTRICT, SOCIAL_SECURITY_TAX, SUI_SDI_TAX,
    SUI_SDI_TAX_CODE, VOID_CHECK_INDICATOR, WEEK_NUMBER, WORKED_LOCAL_TAX_CODE, WORKED_STATE_TAX_CODE,
    WORKED_LOCAL_TAX, WORKED_STATE_TAX, YEAR, COMPANY_CODE, FILE_NUMBER,
    FIRST_NAME, LAST_NAME, LAST_NAME_FIRST_NAME, SOCIAL_SECURITY_NUMBER, STATUS,
    OVERTIME_EARNINGS, OVERTIME_HOURS, REGULAR_EARNINGS, REGULAR_HOURS, VIEWPK,
    HOME_COST_NUMBER, TAX_FREQUENCY, COMPANY_COST_NUMBER, COST_NUMBER_WORKED_IN, DISTRIBUTION_NUMBER,
    TOTAL_DEDUCTIONS_AMOUNT, TOTAL_HOURS_AMOUNT, TOTAL_MEMO_AMOUNT, TOTAL_OTHER_EARNINGS, TOTAL_OTHER_HOURS,
    CHECK_SEQ_NO, JOINKEY, CHECK_REVERSAL_INDICATOR
    as
    with user_security_homedept
    AS
    (select /*+ INLINE */ distinct cg.cidn,co_code,asso.oid,asso.name,department_Access ,t2.column_value dep,cg.oid
    from px17_cocodegroup cg ,
    px17_associate asso ,
         px17_securityobject so,
         px17_cocodegrp_securitygrp cs,
         px17_security_group sg ,
         TABLE(f_str2tbl_px17(cg.department_access)) t2
    where cg.USEROID = asso.OID
    and cg.co_code = substr(so.name,8,3)
    and upper(asso.name) = upper(sys_context('payx_r17_app_context', 'app_userid'))
    and cg.oid = cs.cocodegroupoid
    and cs.securitygroupoid = sg.oid
         and cg.cidn = asso.cidn
         and cg.cidn = so.cidn
         and cg.cidn = cs.cidn
         and cs.cidn = sg.cidn
    order by 2,1
    user_security_cost_no
    AS
    (select /*+ INLINE */
    cg.cidn,co_code,count(distinct cd.code)cost_no,cd.code
    from px17_cocodegroup cg ,
    px17_associate asso ,
         px17_securityobject so,
         px17_cocodegrp_securitygrp cs,
         px17_security_group sg ,
         px17_customaccessdetail cd
    where cg.USEROID = asso.OID
    and cg.co_code = substr(so.name,8,3)
    and upper(asso.name) = upper(sys_context('payx_r17_app_context', 'app_userid'))
    and cg.oid = cs.cocodegroupoid
    and cs.securitygroupoid = sg.oid
    and cg.oid = cd.cocodegroupoid(+)
         and cg.cidn = cd.cidn(+)
         and cg.cidn = asso.cidn
         and cg.cidn = so.cidn
         and cg.cidn = cs.cidn
         and cs.cidn = sg.cidn
    group by cg.cidn,co_code,cd.code
    order by 2,1
    super_user_check as
    (SELECT
    distinct a.cidn su_cidn,1 as su_user
    FROM
    px17_LINK LN
    , px17_userprofile up
    , px17_ASSOCIATE a
    , px17_pcp_user pu
    WHERE
    a.oid = pu.oid
    AND pu.userprofileoid = up.oid
    AND LN.parentoid = up.oid
    AND a.active = 1
    AND a.cidn=pu.cidn
    AND pu.cidn=up.cidn
    AND ln.cidn=up.cidn
    AND upper(a.name) = upper(sys_context('payx_r17_app_context', 'app_userid'))
    AND upper(up.name) = upper('Super user')
    nonsuper_user_check as
    SELECT distinct a.cidn s_cidn , 1 as non_user
    FROM
    px17_LINK LN
    , px17_userprofile up
    , px17_ASSOCIATE a
    , px17_pcp_user pu
    WHERE
    a.oid = pu.oid
    AND pu.userprofileoid = up.oid
    AND LN.parentoid = up.oid
    AND a.active = 1
    AND a.cidn=pu.cidn
    AND pu.cidn=up.cidn
    AND ln.cidn=up.cidn
    AND upper(a.name) = upper(sys_context('payx_r17_app_context', 'app_userid'))
         AND LN.childoid IN ( 'SYS:5:7478')
    SELECT distinct
    cidn
         ,batch_number     Batch_Number
         , business_unit     Business_Unit
         , check_voucher_number     Check_Voucher_Number
         , check_voucher_code     Check_Voucher_Code
         , clock_number     CheckView_Clock_Number
         , company_code_or_dept     Company_CheckView_Home_Dept
         , period_end_date     Period_End_Date
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, 1, (INSTR(taxes_and_rates, '~', 1, 1) -1)), CHR(155), NULL))     Federal_Tax
         , gross_pay     Gross_Pay
         , home_department     Home_Department
         , home_department_descr     Home_Department_Desc
         , SUBSTR(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 1) +1)
                   , INSTR(taxes_and_rates, '~', 1, 2) - (INSTR(taxes_and_rates, '~', 1, 1) +1)), CHR(155), NULL), 1, 32)     Lived_Local_Tax_Code
         , SUBSTR(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 2) +1)
                   , INSTR(taxes_and_rates, '~', 1, 3) - (INSTR(taxes_and_rates, '~', 1, 2) +1)), CHR(155), NULL), 1, 32)     Lived_State_Tax_Code
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 3) +1)
                   , INSTR(taxes_and_rates, '~', 1, 4) - (INSTR(taxes_and_rates, '~', 1, 3) +1)), CHR(155), NULL))     Lived_Local_Tax
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 4) +1)
                   , INSTR(taxes_and_rates, '~', 1, 5) - (INSTR(taxes_and_rates, '~', 1, 4) +1)), CHR(155), NULL))     Lived_State_Tax
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 5) +1)
                   , INSTR(taxes_and_rates, '~', 1, 6) - (INSTR(taxes_and_rates, '~', 1, 5) +1)), CHR(155), NULL))     Medicare_Tax
         , net_pay     Net_Pay
         , department_paid     Department_Worked_In
         , to_pay_indicator     Pay_to_Company_Indicator
         , pay_date     Pay_Date
         , payroll_number     Payroll_Number
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 6) +1)
                   , INSTR(taxes_and_rates, '~', 1, 7) - (INSTR(taxes_and_rates, '~', 1, 6) +1)), CHR(155), NULL))     School_District_Tax
         , SUBSTR(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 7) +1)
                   , INSTR(taxes_and_rates, '~', 1, 8) - (INSTR(taxes_and_rates, '~', 1, 7) +1)), CHR(155), NULL), 1, 32) CheckView_School_District
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 8) +1)
                   , INSTR(taxes_and_rates, '~', 1, 9) - (INSTR(taxes_and_rates, '~', 1, 8) +1)), CHR(155), NULL))     Social_Security_Tax
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 9) +1)
                   , INSTR(taxes_and_rates, '~', 1, 10) - (INSTR(taxes_and_rates, '~', 1, 9) +1)), CHR(155), NULL))     SUI_SDI_Tax
         , SUBSTR(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 10) +1)
                   , INSTR(taxes_and_rates, '~', 1, 11) - (INSTR(taxes_and_rates, '~', 1, 10) +1)), CHR(155), NULL), 1, 32) SUI_SDI_Tax_Code
         , void_check_indicator     Void_Check_Indicator
         , week_number     Week_Number
         , SUBSTR(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 11) +1)
                   , INSTR(taxes_and_rates, '~', 1, 12) - (INSTR(taxes_and_rates, '~', 1, 11) +1)), CHR(155), NULL), 1, 32) Worked_Local_Tax_Code
         , SUBSTR(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 12) +1)
                   , INSTR(taxes_and_rates, '~', 1, 13) - (INSTR(taxes_and_rates, '~', 1, 12) +1)), CHR(155), NULL), 1, 32) Worked_State_Tax_Code
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 13) +1)
                   , INSTR(taxes_and_rates, '~', 1, 14) - (INSTR(taxes_and_rates, '~', 1, 13) +1)), CHR(155), NULL))     Worked_Local_Tax
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 14) +1)
                   , INSTR(taxes_and_rates, '~', 1, 15) - (INSTR(taxes_and_rates, '~', 1, 14) +1)), CHR(155), NULL))     Worked_State_Tax
         , year          Year
         , company_code     Company_Code
         , file_number     File_Number
         , first_name     First_Name
         , last_name          Last_Name
         , name          Last_Name_First_Name
         , ssn               Social_Security_Number
         , status          Status
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 15) +1)
                   , INSTR(taxes_and_rates, '~', 1, 16) - (INSTR(taxes_and_rates, '~', 1, 15) +1)), CHR(155), NULL))     Overtime_Earnings
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 16) +1)
                   , INSTR(taxes_and_rates, '~', 1, 17) - (INSTR(taxes_and_rates, '~', 1, 16) +1)), CHR(155), NULL))     Overtime_Hours
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 17) +1)
                   , INSTR(taxes_and_rates, '~', 1, 18) - (INSTR(taxes_and_rates, '~', 1, 17) +1)), CHR(155), NULL))     Regular_Earnings
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 18) +1)
                   , INSTR(taxes_and_rates, '~', 1, 19) - (INSTR(taxes_and_rates, '~', 1, 18) +1)), CHR(155), NULL))     Regular_Hours
         , (company_code || '/' || ssn || '/' || file_number || '/' || TO_CHAR(payroll_number) || '/'
              || TO_CHAR(year) || '/' || TO_CHAR(week_number) || '/' || check_voucher_number
              || '/' || to_char(check_seq_num) || '/' || TO_CHAR(distribution_number)) Viewpk
         , home_costnumber_desc Home_Cost_Number
         , tax_frequency Tax_Frequency
         , co_chkv_home_cost_no Company_Cost_Number
         , cost_no_worked_in Cost_Number_Worked_In
         , distribution_number Distribution_Number
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 19) +1)
                   , INSTR(taxes_and_rates, '~', 1, 20) - (INSTR(taxes_and_rates, '~', 1, 19) +1)), CHR(155), NULL))     Total_Deductions_Amount
         , NVL(TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 20) +1)
                   , INSTR(taxes_and_rates, '~', 1, 21) - (INSTR(taxes_and_rates, '~', 1, 20) +1)), CHR(155), NULL)), 0) Total_Hours_Amount
         , NVL(TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 21) +1)
                   , INSTR(taxes_and_rates, '~', 1, 22) - (INSTR(taxes_and_rates, '~', 1, 21) +1)), CHR(155), NULL)), 0) Total_Memo_Amount
         , NVL(TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 22) +1)
                   , INSTR(taxes_and_rates, '~', 1, 23) - (INSTR(taxes_and_rates, '~', 1, 22) +1)), CHR(155), NULL)), 0) Total_Other_Earnings
         , TO_NUMBER(REPLACE(SUBSTR(taxes_and_rates, (INSTR(taxes_and_rates, '~', 1, 23) +1)), CHR(155), NULL))     Total_Other_Hours
         , check_seq_num Check_Seq_No
         , (NVL(company_code, '~') || CHR(155) || NVL(file_number, '~') || CHR(155) || NVL(ssn, '~') || CHR(155) || NVL(TO_CHAR(year), '~') || CHR(155)
              || NVL(TO_CHAR(week_number), '~') || CHR(155) || NVL(TO_CHAR(payroll_number), '~')
              || CHR(155) || NVL(check_voucher_number, '~') || CHR(155) || NVL(TO_CHAR(check_seq_num), '~') || CHR(155) || NVL(TO_CHAR(distribution_number), '~')) Joinkey
         , chk_reverse Check_Reversal_Indicator
    FROM
              SELECT
              ch.cidn cidn
                   /*BATCH NUMBER*/
                   , ch.batch_nb     batch_number
                   , /*BUSINESS UNIT*/
                   (select asso.description
                        from     px17_appointment ap,
                             px17_jobposition jp,
                             px17_corporation co,
                             px17_associate asso,
                             px17_payrollagreement pa,
                             px17_payrollgroup pg
                        where
                        ch.cidn = pg.cidn
                                       AND ch.cidn = pa.cidn
                                       AND pa.cidn = pg.cidn
                                       AND pa.cidn = ap.cidn
                                       AND em.cidn = ap.cidn
                                       AND ap.cidn = jp.cidn
                                       and jp.cidn = co.cidn
                                       and co.cidn = asso.cidn
                        and ch.co_code=pg.co_code
                        and     ch.file_nb=pa.file_number
                        and     pa.cocodeoid=pg.oid
                        and     pa.appointmentoid=ap.oid
                        and     em.oid=ap.employmentoid
                        and     ap.jobpositionoid=jp.oid
                             and     jp.corporationoid=co.oid
                        and     co.oid=asso.oid)     business_unit
                   , /*CHECK/VOUCHER NUMBER*/
                   ch.check_nb     check_voucher_number
                   , /*CHECK/VOUCHER CODE*/
                   SUBSTR(f_type_px17(ch.cidn,ch.chkvchcodeoid, 'NAME'), 1, 255) check_voucher_code
                   , /*CLOCK NUMBER*/
                   ch.clock_id     clock_number
                   , /* COMPANY CODE OR DEPT*/
                   ch.co_code||'/'||substr(ch.home_dept_code,1,20)     company_code_or_dept
                   , /*PERIOD END DATE*/
                   ch.payroll_ending_date     period_end_date
                   , /*GROSS PAY*/
                   NVL(chd.gross_pay_amt,0)     gross_pay
                   , /*HOME DEPARTMENT*/
                   ch.home_dept_code     home_department
                   , /*HOME DEPARTMENT DESCRIPTION*/
                   (select     ty.description
                        from     px17_type ty,px17_securityobject sc
                        where
                        ch.cidn = sc.cidn     
                        and ty.cidn in ('COMMON', ch.cidn)
                        and ch.home_dept_code=ty.name
                        and     ty.category='T_CO_DEPT'
                        and      ty.securityoid=sc.oid
                        and     ch.co_code=substr(sc.name,8))     home_department_descr
                   , /*NET PAY*/
                   nvl(chd.net_pay_amt,0)     net_pay
                   , /*DEPARTMENT PAID*/
                   -- ch.paid_in_debt_code     department_paid
                   chd.worked_in_dept     department_paid
                   , /*TO PAY INDICATOR*/
                   decode(to_char(ch.pay_to_co),'1','Y','0','N',to_char(ch.pay_to_co))     to_pay_indicator
                   , /*PAY DATE*/
                   ch.pay_date     pay_date
                   , /*PAYROLL NUMBER*/
                   to_char(ch.payroll_nb)     payroll_number
                   , /*VOID CHECK INDICATOR*/
                   decode(to_char(ch.void_flag),'1','Y','0','N',to_char(ch.void_flag))     void_check_indicator
                   , /*WEEK NUMBER*/
                   TO_number(ch.week)     week_number
                   , /*YEAR*/
                        to_char(ch.year)     year
                   , /*COMPANY CODE*/
                   ch.co_code     company_code
                   , /*FILE NUMBER*/
                   LPAD(ch.file_nb,6,0)     file_number
                   , /*FIRST NAME*/
                   pe.first_name     first_name
                   , /*LAST NAME*/
                   pe.last_name     last_name
                   , /*NAME*/
                   pe.last_name||', '||pe.first_name     name
                   , /*SSN*/
                   payx_r17_principal_info.masked_ssn(pe.unique_id, ch.cidn)      ssn
                   , /*STATUS*/
                   (SELECT SUBSTR(f_type_px17(ap.cidn,ap.currentstatusoid, 'DESC'), 1, 255)
                        from
                             px17_appointment ap,
                             /*context co_ap,*/
                             px17_payrollagreement pa,
                             px17_payrollgroup pg
                        where     
                        pg.cidn=ch.cidn
                             and pa.cidn=ch.cidn
                                  and ap.cidn=pa.cidn
                                  and ap.cidn = em.cidn
                        and ap.employmentoid=em.oid
                        and     ap.active=1
                        and     ap.oid=pa.appointmentoid
                        and     lpad(to_char(pa.file_number),6,0)=ch.file_nb
                        and     pa.cocodeoid=pg.oid
                        and     pg.co_code=ch.co_code)     status
                   --          FED TAX
                   --          , LIVED LOCAL TAX CODE, LIVED STATE TAX CODE, LIVED LOCAL TAX, LIVED STATE TAX, MEDICARE TAX
                   --          , SCHOOL DISTRICT TAX, SCHOOL DISTRICT, SOCIAL SECURITY TAX, SUI SDI TAX, SUI SDI TAX CODE
                   --          , WORKED LOCAL TAX CODE, WORKED STATE TAX CODE, WORKED LOCAL TAX, WORKED STATE TAX
                   --          , OVERTIME EARNINGS, OVERTIME HOURS, REGULAR EARNINGS, REGULAR HOURS
                   NVL (
                        (SELECT
                             TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2982', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || NVL(MAX(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2984', ci.code, NULL), NULL)), CHR(155)) || '~'
                             || NVL(MAX(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2987', DECODE(ci.code,'XX',null,ci.code), NULL), NULL)), CHR(155)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2984', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2987', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:4118', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:4114', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || NVL(MAX(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:4114', ci.code, NULL), NULL)), CHR(155)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2988', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2989', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || NVL(MAX(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2989', ci.code, NULL), NULL)), CHR(155)) || '~'
                             || NVL(MAX(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2983', ci.code, NULL), NULL)), CHR(155)) || '~'
                             || NVL(MAX(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2986', ci.code, NULL), NULL)), CHR(155)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2983', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3709', DECODE(ci.taxcodeoid, 'SYS:4:2986', NVL(ci.amount,0), 0), 0) ), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3713', NVL(ci.amount,0), 0)), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3727', NVL(ci.amount,0), 0)), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3715', NVL(ci.amount,0), 0)), 0)) || '~'
                             || TO_CHAR(NVL(SUM(DECODE(ci.histtypeoid, 'SYS:4:3716', NVL(ci.amount,0), 0)), 0)) || '~'
                             -- R16 columns.
                             -- Total Deductions Amount === Other Deductions on UI screen.
                             || TO_CHAR(NVL(SUM(DECODE(chcat.name, 'DeductionHistory'
                                  , DECODE(NVL(ci.statutory_ded, 0), 0
                                       , DECODE(ci.taxcodeoid, NULL
                                            , DECODE(ci.code, NULL, 0, NVL(ci.amount,0)), 0), 0), 0)), 0)) || '~' -- "Total Deductions Amount"
                             || TO_CHAR(NVL(SUM(DECODE(chcat.name, 'OvertimeHours', NVL(ci.amount,0)
                                  , 'AdditionalHours', NVL(ci.amount,0), 'RegularHours', NVL(ci.amount,0), 0)), 0)) || '~' -- "Total Hours Amount"
                             || TO_CHAR(NVL(SUM(DECODE(chcat.name, 'Memo', NVL(ci.amount,0), 0)), 0)) || '~' -- "Total Memo Amount"
                             || TO_CHAR(NVL(SUM(DECODE(chcat.name, 'AdditionalEarnings', NVL(ci.amount,0), 0)), 0)) || '~' -- "Total Other Earnings"
                             || TO_CHAR(NVL(SUM(DECODE(chcat.name, 'AdditionalHours', NVL(ci.amount,0), 0)), 0)) -- "Total Other Hours"
                        FROM
                             px17_checkhistoryitem ci
                             , px17_sys_type chcat
                        WHERE
                        ci.cidn=chd.cidn
                             AND ci.checkhistorydistributionoid = chd.oid
                             AND chcat.category = 'CheckHistoryItem'
                             AND chcat.oid = ci.histtypeoid
                             -- AND ci.histtypeoid IN ('SYS:4:3713', 'SYS:4:3727', 'SYS:4:3715', 'SYS:4:3716', 'SYS:4:3709')
                        ), '0' || '~' || CHR(155) || '~' || CHR(155)
                             || '0~0~0~0~' || CHR(155) || '~0~0~' || CHR(155) || '~' || CHR(155) || '~'
                             || CHR(155) || '~0~0~0~0~0~0'
                        )     taxes_and_rates
                   , ch.check_seq_num check_seq_num
                   , ch.home_cost_number home_costnumber_desc
                   , SUBSTR(f_type_px17(ch.cidn,ch.payfrequencyoid, 'NAME'), 1, 255) tax_frequency
                   , (ch.co_code || '/' || ch.home_cost_number) co_chkv_home_cost_no
                   , chd.worked_in_cost_number cost_no_worked_in
                   , chd.distribution_number distribution_number
                   , DECODE(NVL(ch.reversed_flag, 0), 1, 'Y', 'N') chk_reverse
              FROM
                   px17_checkhistory ch
                   , px17_employment em
                   , px17_person pe
                   , px17_payrollgroup pg
                   , px17_checkhistory_dist chd
                   , px17_appointment ap
              WHERE
              ch.cidn = em.cidn
              and em.cidn = pe.cidn
              and pg.cidn = ch.cidn
              and ch.cidn = chd.cidn
              and ap.cidn(+) = em.cidn
                   and ch.employmentoid=em.oid
                   AND     em.personoid=pe.oid
                   AND     pg.co_code = ch.co_code
                   AND ch.active = 1
                   AND ch.oid = chd.checkhistoryoid
                   AND ap.employmentoid(+) = em.oid
                   AND DECODE(ap.oid, NULL, 1, NVL((SELECT 1 FROM px17_payrollagreement pa
                                  WHERE
                                  pa.cidn = ap.cidn
                                  and pa.cidn = ch.cidn
                                  and pa.cidn = pg.cidn
                                  and pa.appointmentoid = ap.oid
                                       AND pa.file_number = ch.file_nb
                                       AND pa.cocodeoid = pg.oid), 0)) = 1
                                       and ch.cidn in (select distinct s_cidn from nonsuper_user_check)
                                       AND ( sys_context('payx_r17_app_context', 'app_role') in ('ADP', 'CSR')
              or (exists (select 1 from super_user_check where su_cidn =ch.cidn))
              or (ch.cidn,ch.co_code,ch.home_dept_code) in (select cidn,co_code,dep from user_security_homedept)          
              or (ch.cidn,ch.co_code,ch.home_cost_number) in (select cidn,co_code,code from user_security_cost_no)
                   or ( exists(select co_code from user_security_homedept where cidn=ch.cidn and co_code = ch.co_code and dep is null)
                   and exists(select co_code from user_security_cost_no where cidn=ch.cidn and co_code = ch.co_code and cost_no = 0) )
    Following are the functions being called:
    create or replace type myTable_17 as table of varchar2(4000);
    CREATE OR REPLACE function f_str2tbl_px17( p_str in varchar2 ) return myTable_17 pipelined
    as
    l_str long default p_str || ',';
    l_n number;
    begin
    loop
    l_n := instr( l_str, ',' );
    exit when (nvl(l_n,0) = 0);
    pipe row( ltrim(rtrim(substr(l_str,1,l_n-1))) );
    l_str := ltrim( substr( l_str, l_n+1 ) );
    end loop;
    return;
    end f_str2tbl_px17;
    CREATE OR REPLACE FUNCTION f_check_purge_px17
              fv_cidn px17_reservedfilenumber.cidn%TYPE,     
              fv_file_number     px17_reservedfilenumber.file_number%TYPE,
              fv_cocode     px17_payrollgroup.co_code%TYPE DEFAULT NULL
         ) RETURN NUMBER AUTHID CURRENT_USER
    AS
         v_val     NUMBER(5) ;
    BEGIN
         IF fv_cocode IS NULL THEN
              RETURN 0 ;
         END IF ;
         SELECT 1 INTO v_val
         FROM px17_reservedfilenumber a,
    px17_payrollgroup b
         WHERE
         a.cidn = fv_cidn
         AND b.cidn = fv_cidn
         AND a.file_number = fv_file_number
         AND a.parentoid = b.oid
    AND b.co_code = fv_cocode
         AND ROWNUM = 1 ;
         RETURN 1 ;
    EXCEPTION
         WHEN no_data_found THEN
              RETURN 0 ;
    END f_check_purge_px17 ;
    CREATE OR REPLACE FUNCTION f_check_security_px17
         fv_cidn IN px17_type_client.cidn%TYPE,
              fv_cocode          px17_cocodegroup.co_code%TYPE -- pg.cocode
              , fv_home_dept     px17_type_client.name%TYPE -- ap.home_dept
         ) RETURN NUMBER AUTHID CURRENT_USER
    AS
         v_val     NUMBER(5) ;
         v_key          VARCHAR2(20) ;
         v_users     VARCHAR2(4000) ;
         v_cocodes     VARCHAR2(4000) ;
    BEGIN
         BEGIN
              SELECT c_user_list, c_cocodes, c_run_key
              INTO v_users, v_cocodes, v_key
              FROM px17_t_context_vals
              WHERE c_run_key = (SELECT MAX(c_run_key) FROM px17_t_context_vals)
                   AND ROWNUM = 1 ;
         EXCEPTION
              WHEN no_data_found THEN
                   v_cocodes := NULL ;
         END ;
         IF v_cocodes IS NULL THEN
              RETURN 1 ;
         ELSIF INSTR( (v_cocodes || ','), (fv_cocode || ',') ) = 0 THEN
              RETURN 0 ;
         ELSE
              BEGIN
                   SELECT
                        1
                   INTO
                        v_val
                   FROM
                        px17_type_client t
                        , px17_securityobject s
                        , px17_cocodegroup c
                   WHERE
                        t.securityoid=s.oid
                        AND t.category='T_CO_DEPT'
                        AND c.useroid=(SELECT a.oid
                                       FROM px17_associate a
                                       WHERE a.oid = c.useroid
                                            AND a.active=1
                                            AND UPPER(a.name) = UPPER(v_users)
                                            AND ROWNUM = 1)
                        AND SUBSTR(s.name,8,3)=c.co_code
                        AND (c.department_access IS NULL
                             OR c.department_access LIKE '%' || t.name || '%')
                        AND SUBSTR(s.name,8,3) = fv_cocode
                        AND t.name = fv_home_dept
                        AND ROWNUM = 1 ;
                        RETURN 1 ;
              EXCEPTION
                   WHEN no_data_found THEN
                        BEGIN
                             SELECT
                                  1
                             INTO
                                  v_val
                             FROM
                                  px17_cocodegroup c
                                  , px17_associate a
                             WHERE
                                  c.useroid=a.oid
                                  AND c.department_access IS NULL
                                  AND c.co_code = fv_cocode
                                  AND UPPER(a.name)= UPPER(v_users)
                                  AND a.active=1
                                  AND ROWNUM = 1 ;
                             RETURN 1 ;
                        EXCEPTION
                             WHEN no_data_found THEN
                                  RETURN 0 ;
                        END ;
              END ;
         END IF ;
         RETURN 0 ;
    END f_check_security_px17 ;
    SELECT SUBSTR(f_type_px17(ap.cidn,ap.currentstatusoid, 'DESC'), 1, 255)
                        from
                             px17_appointment ap,
                             /*context co_ap,*/
                             px17_payrollagreement pa,
                             px17_payrollgroup pg
    CREATE OR REPLACE FUNCTION f_type_px17
    fv_cidn IN px17_type_client.cidn%TYPE,
    fv_oid IN px17_type_client.oid%TYPE,
    fv_col IN VARCHAR2 DEFAULT NULL
    ) RETURN VARCHAR2 AUTHID CURRENT_USER AS
    v_rtn_name px17_type_client.name%TYPE := NULL ;
    v_rtn_desc px17_type_client.description%TYPE := NULL ;
    BEGIN
    IF fv_oid IS NOT NULL THEN
    BEGIN
    IF UPPER(SUBSTR(fv_oid,1,3)) = 'SYS' THEN
    SELECT name, description
    INTO v_rtn_name, v_rtn_desc
    FROM px17_sys_type
    WHERE oid = fv_oid
    AND ROWNUM = 1 ;
    ELSE
    SELECT name, description
    INTO v_rtn_name, v_rtn_desc
    FROM px17_type_client
    WHERE oid = fv_oid
         AND cidn = fv_cidn
    AND ROWNUM = 1 ;
    END IF ;
    EXCEPTION
    WHEN no_data_found THEN
    v_rtn_name := NULL ;
    v_rtn_desc := NULL ;
    END ;
    END IF ;
    IF (UPPER(NVL(fv_col, '~')) = 'NAME') THEN
    RETURN v_rtn_name ;
    ELSIF ((UPPER(NVL(fv_col, '~')) = 'DESC')
    OR (UPPER(NVL(fv_col, '~')) = 'DESCRIPTION')) THEN
    RETURN v_rtn_desc ;
    ELSE
    RETURN (NVL(v_rtn_name, CHR(155)) || '~' || NVL(v_rtn_desc, CHR(155))) ;
    END IF ;
    END f_type_px17 ;
    *************************

  • HT5622 Sorry but I can't order any tunes for my ipod nano because a new trems and agreement statement keeps coming up sooooo where is the agree or disagree ( to check ) located? Read through the info twice even though it is langthy . ????

    Sorry I can't order any new itunes for my nano because a new terms and agreement comes up after I press buy . It asks to click on agree or disagree? What I would like to know is where are these 2 terms located. Read through this twice and couldn't find any place to answer this question. So can't order any more music!!!

    Hey briannagrace96,
    Welcome to Apple Support Communities! I'd check out the following article, it looks like it applies to your situation:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/ts1363
    You'll want to go through the following troubleshooting steps, and for more detail on each step follow the link to the article above:
    Try the iPod troubleshooting assistant:
    If you have not already done so, try the steps in the iPod Troubleshooting Assistant (choose your iPod model from the list).
    If the issue remains after following your iPod's troubleshooting assistant, follow the steps below to continue troubleshooting your issue.
    Restart the iPod Service
    Restart the Apple Mobile Device Service
    Empty your Temp directory and restart
    Verify that the Apple Mobile Device USB Driver is installed
    Change your iPod's drive letter
    Remove and reinstall iTunes
    Disable conflicting System Services and Startup Items
    Update, Reconfigure, Disable, or Remove Security Software
    Deleting damaged or incorrect registry keys
    Take care,
    David

  • Index not getting used in the query(Query performance improvement)

    Hi,
    I am using oracle 10g version and have this query:
    select distinct bk.name             "Book Name",
                    fs.feed_description "Feed Name",
                    fbs.cob_date        "Cob",
                    at.description      "Data Type",
                    ah.user_name        " User",
                    ah.comments         "Comments",
                    ah.time_draft
      from Action_type       at,
           action_history    ah,
           sensitivity_audit sa,
           logical_entity    le,
           feed_static       fs,
           feed_book_status  fbs,
           feed_instance     fi,
           marsnode          bk
    where at.description = 'Regress Positions'
       and fbs.cob_date BETWEEN '01 Feb 2011' AND '08 Feb 2011'
       and fi.most_recent = 'Y'
       and bk.close_date is null
       and ah.time_draft = 'after'
       and sa.close_action_id is null
       and le.close_action_id is null
       and at.action_type_id = ah.action_type_id
       and ah.action_id = sa.create_action_id
       and le.logical_entity_id = sa.type_id
       and sa.feed_id = fs.feed_id
       and sa.book_id = bk.node_id
       and sa.feed_instance_id = fi.feed_instance_id
       and fbs.feed_instance_id = fi.feed_instance_id
       and fi.feed_id = fs.feed_id
    union
    select distinct bk.name             "Book Name",
                    fs.feed_description "Feed Name",
                    fbs.cob_date        "Cob",
                    at.description      "Data Type",
                    ah.user_name        " User",
                    ah.comments         "Comments",
                    ah.time_draft
      from feed_book_status         fbs,
           marsnode                 bk,
           feed_instance            fi,
           feed_static              fs,
           feed_book_status_history fbsh,
           Action_type              at,
           Action_history           ah
    where fbs.cob_date BETWEEN '01 Feb 2011' AND '08 Feb 2011'
       and ah.action_type_id = 103
       and bk.close_date is null
       and ah.time_draft = 'after'
    --   and ah.action_id = fbs.action_id
       and fbs.book_id = bk.node_id
       and fbs.book_id = fbsh.book_id
       and fbs.feed_instance_id = fi.feed_instance_id
       and fi.feed_id = fs.feed_id
       and fbsh.create_action_id = ah.action_id
       and at.action_type_id = ah.action_type_id
    union
    select distinct bk.name             "Book Name",
                    fs.feed_description "Feed Name",
                    fbs.cob_date        "Cob",
                    at.description      "Data Type",
                    ah.user_name        " User",
                    ah.comments         "Comments",
                    ah.time_draft
      from feed_book_status         fbs,
           marsnode                 bk,
           feed_instance            fi,
           feed_static              fs,
           feed_book_status_history fbsh,
           Action_type              at,
           Action_history           ah
    where fbs.cob_date BETWEEN '01 Feb 2011' AND '08 Feb 2011'
       and ah.action_type_id = 101
       and bk.close_date is null
       and ah.time_draft = 'after'
       and fbs.book_id = bk.node_id
       and fbs.book_id = fbsh.book_id
       and fbs.feed_instance_id = fi.feed_instance_id
       and fi.feed_id = fs.feed_id
       and fbsh.create_action_id = ah.action_id
       and at.action_type_id = ah.action_type_id;This is the execution plan
    | Id  | Operation                            | Name                     | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                     |                          |   231 | 43267 |   104K (85)|
    |   1 |  SORT UNIQUE                         |                          |   231 | 43267 |   104K (85)|
    |   2 |   UNION-ALL                          |                          |       |       |            |
    |   3 |    NESTED LOOPS                      |                          |     1 |   257 | 19540  (17)|
    |   4 |     NESTED LOOPS                     |                          |     1 |   230 | 19539  (17)|
    |   5 |      NESTED LOOPS                    |                          |     1 |   193 | 19537  (17)|
    |   6 |       NESTED LOOPS                   |                          |     1 |   152 | 19534  (17)|
    |*  7 |        HASH JOIN                     |                          |   213 | 26625 | 19530  (17)|
    |*  8 |         TABLE ACCESS FULL            | LOGICAL_ENTITY           |    12 |   264 |     2   (0)|
    |*  9 |         HASH JOIN                    |                          |  4267 |   429K| 19527  (17)|
    |* 10 |          HASH JOIN                   |                          |  3602 | 90050 |  1268  (28)|
    |* 11 |           INDEX RANGE SCAN           | IDX_FBS_CD_FII_BI        |  3602 | 46826 |    22   (5)|
    |* 12 |           TABLE ACCESS FULL          | FEED_INSTANCE            |   335K|  3927K|  1217  (27)|
    |* 13 |          TABLE ACCESS FULL           | SENSITIVITY_AUDIT        |   263K|    19M| 18236  (17)|
    |  14 |        TABLE ACCESS BY INDEX ROWID   | FEED_STATIC              |     1 |    27 |     1   (0)|
    |* 15 |         INDEX UNIQUE SCAN            | IDX_FEED_STATIC_FI       |     1 |       |     0   (0)|
    |* 16 |       TABLE ACCESS BY INDEX ROWID    | MARSNODE                 |     1 |    41 |     3   (0)|
    |* 17 |        INDEX RANGE SCAN              | PK_MARSNODE              |     3 |       |     2   (0)|
    |* 18 |      TABLE ACCESS BY INDEX ROWID     | ACTION_HISTORY           |     1 |    37 |     2   (0)|
    |* 19 |       INDEX UNIQUE SCAN              | PK_ACTION_HISTORY        |     1 |       |     1   (0)|
    |* 20 |     TABLE ACCESS BY INDEX ROWID      | ACTION_TYPE              |     1 |    27 |     1   (0)|
    |* 21 |      INDEX UNIQUE SCAN               | PK_ACTION_TYPE           |     1 |       |     0   (0)|
    |* 22 |    TABLE ACCESS BY INDEX ROWID       | MARSNODE                 |     1 |    41 |     3   (0)|
    |  23 |     NESTED LOOPS                     |                          |   115 | 21505 | 42367  (28)|
    |* 24 |      HASH JOIN                       |                          |   114 | 16644 | 42023  (28)|
    |  25 |       NESTED LOOPS                   |                          |   114 | 13566 | 42007  (28)|
    |* 26 |        HASH JOIN                     |                          |   114 | 12426 | 41777  (28)|
    |* 27 |         HASH JOIN                    |                          |   957 | 83259 | 41754  (28)|
    |* 28 |          TABLE ACCESS FULL           | ACTION_HISTORY           |  2480 | 91760 | 30731  (28)|
    |  29 |          NESTED LOOPS                |                          |  9570K|   456M| 10234  (21)|
    |  30 |           TABLE ACCESS BY INDEX ROWID| ACTION_TYPE              |     1 |    27 |     1   (0)|
    |* 31 |            INDEX UNIQUE SCAN         | PK_ACTION_TYPE           |     1 |       |     0   (0)|
    |  32 |           TABLE ACCESS FULL          | FEED_BOOK_STATUS_HISTORY |  9570K|   209M| 10233  (21)|
    |* 33 |         INDEX RANGE SCAN             | IDX_FBS_CD_FII_BI        |  3602 | 79244 |    22   (5)|
    |  34 |        TABLE ACCESS BY INDEX ROWID   | FEED_INSTANCE            |     1 |    10 |     2   (0)|
    |* 35 |         INDEX UNIQUE SCAN            | PK_FEED_INSTANCE         |     1 |       |     1   (0)|
    |  36 |       TABLE ACCESS FULL              | FEED_STATIC              |  2899 | 78273 |    16   (7)|
    |* 37 |      INDEX RANGE SCAN                | PK_MARSNODE              |     1 |       |     2   (0)|
    |* 38 |    TABLE ACCESS BY INDEX ROWID       | MARSNODE                 |     1 |    41 |     3   (0)|
    |  39 |     NESTED LOOPS                     |                          |   115 | 21505 | 42367  (28)|
    |* 40 |      HASH JOIN                       |                          |   114 | 16644 | 42023  (28)|
    |  41 |       NESTED LOOPS                   |                          |   114 | 13566 | 42007  (28)|
    |* 42 |        HASH JOIN                     |                          |   114 | 12426 | 41777  (28)|
    |* 43 |         HASH JOIN                    |                          |   957 | 83259 | 41754  (28)|
    |* 44 |          TABLE ACCESS FULL           | ACTION_HISTORY           |  2480 | 91760 | 30731  (28)|
    |  45 |          NESTED LOOPS                |                          |  9570K|   456M| 10234  (21)|
    |  46 |           TABLE ACCESS BY INDEX ROWID| ACTION_TYPE              |     1 |    27 |     1   (0)|
    |* 47 |            INDEX UNIQUE SCAN         | PK_ACTION_TYPE           |     1 |       |     0   (0)|
    |  48 |           TABLE ACCESS FULL          | FEED_BOOK_STATUS_HISTORY |  9570K|   209M| 10233  (21)|
    |* 49 |         INDEX RANGE SCAN             | IDX_FBS_CD_FII_BI        |  3602 | 79244 |    22   (5)|
    |  50 |        TABLE ACCESS BY INDEX ROWID   | FEED_INSTANCE            |     1 |    10 |     2   (0)|
    |* 51 |         INDEX UNIQUE SCAN            | PK_FEED_INSTANCE         |     1 |       |     1   (0)|
    |  52 |       TABLE ACCESS FULL              | FEED_STATIC              |  2899 | 78273 |    16   (7)|
    |* 53 |      INDEX RANGE SCAN                | PK_MARSNODE              |     1 |       |     2   (0)|
    ------------------------------------------------------------------------------------------------------and the predicate info
    Predicate Information (identified by operation id):
       7 - access("LE"."LOGICAL_ENTITY_ID"="SA"."TYPE_ID")
       8 - filter("LE"."CLOSE_ACTION_ID" IS NULL)
       9 - access("SA"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      10 - access("FBS"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      11 - access("FBS"."COB_DATE">=TO_DATE(' 2011-02-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "FBS"."COB_DATE"<=TO_DATE(' 2011-02-08 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      12 - filter("FI"."MOST_RECENT"='Y')
      13 - filter("SA"."CLOSE_ACTION_ID" IS NULL)
      15 - access("FI"."FEED_ID"="FS"."FEED_ID")
           filter("SA"."FEED_ID"="FS"."FEED_ID")
      16 - filter("BK"."CLOSE_DATE" IS NULL)
      17 - access("SA"."BOOK_ID"="BK"."NODE_ID")
      18 - filter("AH"."TIME_DRAFT"='after')
      19 - access("AH"."ACTION_ID"="SA"."CREATE_ACTION_ID")
      20 - filter("AT"."DESCRIPTION"='Regress Positions')
      21 - access("AT"."ACTION_TYPE_ID"="AH"."ACTION_TYPE_ID")
      22 - filter("BK"."CLOSE_DATE" IS NULL)
      24 - access("FI"."FEED_ID"="FS"."FEED_ID")
      26 - access("FBS"."BOOK_ID"="FBSH"."BOOK_ID")
      27 - access("FBSH"."CREATE_ACTION_ID"="AH"."ACTION_ID" AND
                  "AT"."ACTION_TYPE_ID"="AH"."ACTION_TYPE_ID")
      28 - filter("AH"."ACTION_TYPE_ID"=103 AND "AH"."TIME_DRAFT"='after')
      31 - access("AT"."ACTION_TYPE_ID"=103)
      33 - access("FBS"."COB_DATE">=TO_DATE(' 2011-02-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "FBS"."COB_DATE"<=TO_DATE(' 2011-02-08 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      35 - access("FBS"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      37 - access("FBS"."BOOK_ID"="BK"."NODE_ID")
      38 - filter("BK"."CLOSE_DATE" IS NULL)
      40 - access("FI"."FEED_ID"="FS"."FEED_ID")
      42 - access("FBS"."BOOK_ID"="FBSH"."BOOK_ID")
      43 - access("FBSH"."CREATE_ACTION_ID"="AH"."ACTION_ID" AND
                  "AT"."ACTION_TYPE_ID"="AH"."ACTION_TYPE_ID")
      44 - filter("AH"."ACTION_TYPE_ID"=101 AND "AH"."TIME_DRAFT"='after')
      47 - access("AT"."ACTION_TYPE_ID"=101)
      49 - access("FBS"."COB_DATE">=TO_DATE(' 2011-02-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "FBS"."COB_DATE"<=TO_DATE(' 2011-02-08 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      51 - access("FBS"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      53 - access("FBS"."BOOK_ID"="BK"."NODE_ID")
    Note
       - 'PLAN_TABLE' is old versionIn this query, mainly the ACTION_HISTORY and FEED_BOOK_STATUS_HISTORY tables are getting accessed fullly though there are indexes createdon them like this
    ACTION_HISTORY
    ACTION_ID  column Unique index
    FEED_BOOK_STATUS_HISTORY
    (FEED_INSTANCE_ID, BOOK_ID, COB_DATE, VERSION) composite indexI tried all the best combinations however the indexes are not getting used anywhere.
    Could you please suggest some way so the query will perform better way.
    Thanks,
    Aashish

    Hi Mohammed,
    This is what I got after your method of execution plan
    SQL_ID  4vmc8rzgaqgka, child number 0
    select distinct bk.name "Book Name" ,       fs.feed_description "Feed Name" ,       fbs.cob_date
    "Cob" ,       at.description "Data Type" ,       ah.user_name " User" ,       ah.comments "Comments"
    ,       ah.time_draft from Action_type at, action_history  ah, sensitivity_audit sa, logical_entity
    le, feed_static fs, feed_book_status fbs, feed_instance fi, marsnode bk where  at.description =
    'Regress Positions' and    fbs.cob_date BETWEEN '01 Feb 2011' AND '08 Feb 2011' and
    fi.most_recent = 'Y' and    bk.close_date is  null and    ah.time_draft='after' and
    sa.close_action_id is null and    le.close_action_id is null and    at.action_type_id =
    ah.action_type_id and    ah.action_id=sa.create_action_id and    le.logical_entity_id = sa.type_id
    and    sa.feed_id = fs.feed_id and    sa.book_id = bk.node_id and    sa.feed_instance_id =
    fi.feed_instance_id and    fbs.feed_instance_id = fi.feed_instance_id and    fi.feed_id = fs.feed_id
    union select distinct bk.name "Book Name" ,       fs.
    Plan hash value: 1006571916
    | Id  | Operation                            | Name                     | E-Rows |  OMem |  1Mem | Used-Mem |
    |   1 |  SORT UNIQUE                         |                          |    231 |  6144 |  6144 | 6144  (0)|
    |   2 |   UNION-ALL                          |                          |        |       |       |          |
    |   3 |    NESTED LOOPS                      |                          |      1 |       |       |          |
    |   4 |     NESTED LOOPS                     |                          |      1 |       |       |          |
    |   5 |      NESTED LOOPS                    |                          |      1 |       |       |          |
    |   6 |       NESTED LOOPS                   |                          |      1 |       |       |          |
    |*  7 |        HASH JOIN                     |                          |    213 |  1236K|  1236K| 1201K (0)|
    |*  8 |         TABLE ACCESS FULL            | LOGICAL_ENTITY           |     12 |       |       |          |
    |*  9 |         HASH JOIN                    |                          |   4267 |  1023K|  1023K| 1274K (0)|
    |* 10 |          HASH JOIN                   |                          |   3602 |  1095K|  1095K| 1296K (0)|
    |* 11 |           INDEX RANGE SCAN           | IDX_FBS_CD_FII_BI        |   3602 |       |       |          |
    |* 12 |           TABLE ACCESS FULL          | FEED_INSTANCE            |    335K|       |       |          |
    |* 13 |          TABLE ACCESS FULL           | SENSITIVITY_AUDIT        |    263K|       |       |          |
    |  14 |        TABLE ACCESS BY INDEX ROWID   | FEED_STATIC              |      1 |       |       |          |
    |* 15 |         INDEX UNIQUE SCAN            | IDX_FEED_STATIC_FI       |      1 |       |       |          |
    |* 16 |       TABLE ACCESS BY INDEX ROWID    | MARSNODE                 |      1 |       |       |          |
    |* 17 |        INDEX RANGE SCAN              | PK_MARSNODE              |      3 |       |       |          |
    |* 18 |      TABLE ACCESS BY INDEX ROWID     | ACTION_HISTORY           |      1 |       |       |          |
    |* 19 |       INDEX UNIQUE SCAN              | PK_ACTION_HISTORY        |      1 |       |       |          |
    |* 20 |     TABLE ACCESS BY INDEX ROWID      | ACTION_TYPE              |      1 |       |       |          |
    |* 21 |      INDEX UNIQUE SCAN               | PK_ACTION_TYPE           |      1 |       |       |          |
    |* 22 |    TABLE ACCESS BY INDEX ROWID       | MARSNODE                 |      1 |       |       |          |
    |  23 |     NESTED LOOPS                     |                          |    115 |       |       |          |
    |* 24 |      HASH JOIN                       |                          |    114 |   809K|   809K|  817K (0)|
    |  25 |       NESTED LOOPS                   |                          |    114 |       |       |          |
    |* 26 |        HASH JOIN                     |                          |    114 |   868K|   868K| 1234K (0)|
    |* 27 |         HASH JOIN                    |                          |    957 |   933K|   933K| 1232K (0)|
    |* 28 |          TABLE ACCESS FULL           | ACTION_HISTORY           |   2480 |       |       |          |
    |  29 |          NESTED LOOPS                |                          |   9570K|       |       |          |
    |  30 |           TABLE ACCESS BY INDEX ROWID| ACTION_TYPE              |      1 |       |       |          |
    |* 31 |            INDEX UNIQUE SCAN         | PK_ACTION_TYPE           |      1 |       |       |          |
    |  32 |           TABLE ACCESS FULL          | FEED_BOOK_STATUS_HISTORY |   9570K|       |       |          |
    |* 33 |         INDEX RANGE SCAN             | IDX_FBS_CD_FII_BI        |   3602 |       |       |          |
    |  34 |        TABLE ACCESS BY INDEX ROWID   | FEED_INSTANCE            |      1 |       |       |          |
    |* 35 |         INDEX UNIQUE SCAN            | PK_FEED_INSTANCE         |      1 |       |       |          |
    |  36 |       TABLE ACCESS FULL              | FEED_STATIC              |   2899 |       |       |          |
    |* 37 |      INDEX RANGE SCAN                | PK_MARSNODE              |      1 |       |       |          |
    |* 38 |    TABLE ACCESS BY INDEX ROWID       | MARSNODE                 |      1 |       |       |          |
    |  39 |     NESTED LOOPS                     |                          |    115 |       |       |          |
    |* 40 |      HASH JOIN                       |                          |    114 |   743K|   743K|  149K (0)|
    |  41 |       NESTED LOOPS                   |                          |    114 |       |       |          |
    |* 42 |        HASH JOIN                     |                          |    114 |   766K|   766K|  208K (0)|
    |* 43 |         HASH JOIN                    |                          |    957 |   842K|   842K|  204K (0)|
    |* 44 |          TABLE ACCESS FULL           | ACTION_HISTORY           |   2480 |       |       |          |
    |  45 |          NESTED LOOPS                |                          |   9570K|       |       |          |
    |  46 |           TABLE ACCESS BY INDEX ROWID| ACTION_TYPE              |      1 |       |       |          |
    |* 47 |            INDEX UNIQUE SCAN         | PK_ACTION_TYPE           |      1 |       |       |          |
    |  48 |           TABLE ACCESS FULL          | FEED_BOOK_STATUS_HISTORY |   9570K|       |       |          |
    |* 49 |         INDEX RANGE SCAN             | IDX_FBS_CD_FII_BI        |   3602 |       |       |          |
    |  50 |        TABLE ACCESS BY INDEX ROWID   | FEED_INSTANCE            |      1 |       |       |          |
    |* 51 |         INDEX UNIQUE SCAN            | PK_FEED_INSTANCE         |      1 |       |       |          |
    |  52 |       TABLE ACCESS FULL              | FEED_STATIC              |   2899 |       |       |          |
    |* 53 |      INDEX RANGE SCAN                | PK_MARSNODE              |      1 |       |       |          |
    Predicate Information (identified by operation id):
       7 - access("LE"."LOGICAL_ENTITY_ID"="SA"."TYPE_ID")
       8 - filter("LE"."CLOSE_ACTION_ID" IS NULL)
       9 - access("SA"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      10 - access("FBS"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      11 - access("FBS"."COB_DATE">=TO_DATE(' 2011-02-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "FBS"."COB_DATE"<=TO_DATE(' 2011-02-08 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      12 - filter("FI"."MOST_RECENT"='Y')
      13 - filter("SA"."CLOSE_ACTION_ID" IS NULL)
      15 - access("FI"."FEED_ID"="FS"."FEED_ID")
           filter("SA"."FEED_ID"="FS"."FEED_ID")
      16 - filter("BK"."CLOSE_DATE" IS NULL)
      17 - access("SA"."BOOK_ID"="BK"."NODE_ID")
      18 - filter("AH"."TIME_DRAFT"='after')
      19 - access("AH"."ACTION_ID"="SA"."CREATE_ACTION_ID")
      20 - filter("AT"."DESCRIPTION"='Regress Positions')
      21 - access("AT"."ACTION_TYPE_ID"="AH"."ACTION_TYPE_ID")
      22 - filter("BK"."CLOSE_DATE" IS NULL)
      24 - access("FI"."FEED_ID"="FS"."FEED_ID")
      26 - access("FBS"."BOOK_ID"="FBSH"."BOOK_ID")
      27 - access("FBSH"."CREATE_ACTION_ID"="AH"."ACTION_ID" AND
                  "AT"."ACTION_TYPE_ID"="AH"."ACTION_TYPE_ID")
      28 - filter(("AH"."ACTION_TYPE_ID"=103 AND "AH"."TIME_DRAFT"='after'))
      31 - access("AT"."ACTION_TYPE_ID"=103)
      33 - access("FBS"."COB_DATE">=TO_DATE(' 2011-02-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "FBS"."COB_DATE"<=TO_DATE(' 2011-02-08 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      35 - access("FBS"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      37 - access("FBS"."BOOK_ID"="BK"."NODE_ID")
      38 - filter("BK"."CLOSE_DATE" IS NULL)
      40 - access("FI"."FEED_ID"="FS"."FEED_ID")
      42 - access("FBS"."BOOK_ID"="FBSH"."BOOK_ID")
      43 - access("FBSH"."CREATE_ACTION_ID"="AH"."ACTION_ID" AND
                  "AT"."ACTION_TYPE_ID"="AH"."ACTION_TYPE_ID")
      44 - filter(("AH"."ACTION_TYPE_ID"=101 AND "AH"."TIME_DRAFT"='after'))
      47 - access("AT"."ACTION_TYPE_ID"=101)
      49 - access("FBS"."COB_DATE">=TO_DATE(' 2011-02-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "FBS"."COB_DATE"<=TO_DATE(' 2011-02-08 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      51 - access("FBS"."FEED_INSTANCE_ID"="FI"."FEED_INSTANCE_ID")
      53 - access("FBS"."BOOK_ID"="BK"."NODE_ID")
    Note
       - Warning: basic plan statistics not available. These are only collected when:
           * hint 'gather_plan_statistics' is used for the statement or
           * parameter 'statistics_level' is set to 'ALL', at session or system level
    122 rows selected.
    Elapsed: 00:00:02.18The action_type_id column is of NUMBER type.

  • Performance Issue with the query

    Hi Experts,
    While working on peoplesoft, today I was stuck with a problem when one of the Query is performing really bad. With all the statistics updates, query is not performing good. On one of the table, query is spending time doing lot of IO. (db file sequential read wait). And if I delete the stats for the table and let dynamic sampling to take place, query just works good and there is no IO wait on the table.
    Here is the query
    SELECT A.BUSINESS_UNIT_PC, A.PROJECT_ID,  E.DESCR,  A.EMPLID,  D.NAME,  C.DESCR,  A.TRC,
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 1, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 2, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 3, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 4, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 5, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 6, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 7, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 8, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 9, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 10, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 11, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 12, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 13, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 14, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 15, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 16, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 17, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 18, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 19, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 20, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 21, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 22, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 23, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 24, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 25, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 26, 'DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 27, 'MM-DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 28, 'MM-DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 29, 'MM-DD'), A.TL_QUANTITY, 0)),
      SUM( DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 30, 'MM-DD'), A.TL_QUANTITY, 0)),
      SUM( A.EST_GROSS),
      DECODE( A.TRC, 'ROVA1', 0, 'ROVA2', 0, ( SUM( A.EST_GROSS)/100) * 9.75),
      '2012-07-01',
      '2012-07-31',
      SUM(     DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 1, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 2, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 3, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 4, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 5, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 6, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 7, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 8, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 9, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 10, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 11, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 12, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 13, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 14, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 15, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 16, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 17, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 18, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 19, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 20, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 21, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 22, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 23, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 24, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 25, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 9, 2), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 26, 'DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 27, 'MM-DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 28, 'MM-DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 29, 'MM-DD'), A.TL_QUANTITY, 0) +
         DECODE(SUBSTR( TO_CHAR(A.DUR,'YYYY-MM-DD'), 6, 5), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD') + 30, 'MM-DD'), A.TL_QUANTITY, 0)
      DECODE( A.CURRENCY_CD, 'USD', '$', 'GBP', '£', 'EUR', '€', 'AED', 'D', 'NGN', 'N', ' '),
      DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'NG', F.PER_ORG),
      DECODE(TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'MM'),
          TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'MM'),
          TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ')
      || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY'), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'Mon ')
      || TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'YYYY')  || ' / '  || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ')
      || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY')),
      C.TRC,  TO_CHAR(C.EFFDT,'YYYY-MM-DD'),
      E.BUSINESS_UNIT, 
      E.PROJECT_ID
    FROM
         PS_TL_PAYABLE_TIME A, 
         PS_TL_TRC_TBL C,
         PS_PROJECT E, 
         PS_PERSONAL_DATA D,
           PS_PERALL_SEC_QRY D1, 
         PS_JOB F, 
         PS_EMPLMT_SRCH_QRY F1
    WHERE
         D.EMPLID = D1.EMPLID
    AND      D1.OPRID   = 'TMANI'
    AND      F.EMPLID   = F1.EMPLID
    AND      F.EMPL_RCD = F1.EMPL_RCD
    AND      F1.OPRID   = 'TMANI'
    AND      A.DUR BETWEEN TO_DATE('2012-07-01','YYYY-MM-DD') AND TO_DATE('2012-07-31','YYYY-MM-DD')
    AND      C.TRC   = A.TRC
    AND      C.EFFDT =  (SELECT
                   MAX(C_ED.EFFDT) 
                  FROM
                   PS_TL_TRC_TBL C_ED
                     WHERE
                   C.TRC = C_ED.TRC 
                  AND C_ED.EFFDT <= SYSDATE 
    AND      E.BUSINESS_UNIT = A.BUSINESS_UNIT_PC
    AND      E.PROJECT_ID    = A.PROJECT_ID
    AND      A.EMPLID        = D.EMPLID
    AND      A.EMPLID        = F.EMPLID
    AND      A.EMPL_RCD      = F.EMPL_RCD
    AND      F.EFFDT         =  (SELECT
                        MAX(F_ED.EFFDT) 
                      FROM
                        PS_JOB F_ED
                        WHERE
                        F.EMPLID = F_ED.EMPLID 
                      AND      F.EMPL_RCD = F_ED.EMPL_RCD
                        AND      F_ED.EFFDT <= SYSDATE 
    AND      F.EFFSEQ =  (SELECT
                   MAX(F_ES.EFFSEQ) 
                   FROM
                   PS_JOB F_ES
                     WHERE
                   F.EMPLID = F_ES.EMPLID 
                   AND F.EMPL_RCD = F_ES.EMPL_RCD
                     AND F.EFFDT  = F_ES.EFFDT 
    AND      F.GP_PAYGROUP  = DECODE(' ', ' ', F.GP_PAYGROUP, ' ')
    AND      A.CURRENCY_CD  = DECODE(' ', ' ', A.CURRENCY_CD, ' ')
    AND      DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'L', DECODE( F.PER_ORG, 'CWR', 'L', 'E')) = DECODE(' ', ' ', DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'L', DECODE( F.PER_ORG, 'CWR', 'L', 'E')), 'L', 'L', 'E', 'E', 'A', DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'L', DECODE( F.PER_ORG, 'CWR', 'L', 'E')))
    AND ( A.EMPLID, A.EMPL_RCD) IN  (SELECT
                             B.EMPLID,
                             B.EMPL_RCD 
                        FROM
                             PS_TL_GROUP_DTL B
                                    WHERE
                             B.TL_GROUP_ID = DECODE('ER012', ' ', B.TL_GROUP_ID, 'ER012') 
    AND      E.PROJECT_USER1   = DECODE(' ', ' ', E.PROJECT_USER1, ' ')
    AND      A.PROJECT_ID      = DECODE(' ', ' ', A.PROJECT_ID, ' ')
    AND      A.PAYABLE_STATUS <>
      CASE
        WHEN to_number(TO_CHAR(sysdate, 'DD')) < 15
        THEN
          CASE
            WHEN A.DUR > last_day(add_months(sysdate, -2))
            THEN ' '
            ELSE 'NA'
          END
        ELSE
          CASE
            WHEN A.DUR > last_day(add_months(sysdate, -1))
            THEN ' '
            ELSE 'NA'
          END
      END
    AND      A.EMPLID = DECODE(' ', ' ', A.EMPLID, ' ')
    GROUP BY A.BUSINESS_UNIT_PC,
           A.PROJECT_ID,
           E.DESCR,
         A.EMPLID,
           D.NAME,
           C.DESCR,
           A.TRC,
           '2012-07-01',
           '2012-07-31',
           DECODE( A.CURRENCY_CD, 'USD', '$', 'GBP', '£', 'EUR', '€', 'AED', 'D', 'NGN', 'N', ' '),
           DECODE(SUBSTR( F.GP_PAYGROUP, 1, 2), 'NG', 'NG', F.PER_ORG),
           DECODE(TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'MM'), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'MM'), TO_CHAR(to_date('2012-07-31',      'YYYY-MM-DD'), 'Mon ')
           || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY'), TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'Mon ')
           || TO_CHAR(to_date('2012-07-01', 'YYYY-MM-DD'), 'YYYY')  || ' / '
           || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'Mon ')  || TO_CHAR(to_date('2012-07-31', 'YYYY-MM-DD'), 'YYYY')),
           C.TRC,  TO_CHAR(C.EFFDT,'YYYY-MM-DD'),
           E.BUSINESS_UNIT,  E.PROJECT_ID
    HAVING SUM( A.EST_GROSS) <> 0
    ORDER BY 1,
            2,
             5,
             6 ;Here is the screenshot for IO wait
    [https://lh4.googleusercontent.com/-6PFW2FSK3yE/UCrwUbZ0pvI/AAAAAAAAAPA/eHM48AOC0Uo]
    Edited by: Oceaner on Aug 14, 2012 5:38 PM

    Here is the execution plan with all the statistics present
    PLAN_TABLE_OUTPUT
    Plan hash value: 1575300420
    | Id  | Operation                                   | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                            |                    |     1 |   237 |  2703   (1)| 00:00:33 |
    |*  1 |  FILTER                                     |                    |       |       |            |          |
    |   2 |   SORT GROUP BY                             |                    |     1 |   237 |            |          |
    |   3 |    CONCATENATION                            |                    |       |       |            |          |
    |*  4 |     FILTER                                  |                    |       |       |            |          |
    |*  5 |      FILTER                                 |                    |       |       |            |          |
    |*  6 |       HASH JOIN                             |                    |     1 |   237 |  1695   (1)| 00:00:21 |
    |*  7 |        HASH JOIN                            |                    |     1 |   204 |  1689   (1)| 00:00:21 |
    |*  8 |         HASH JOIN SEMI                      |                    |     1 |   193 |  1352   (1)| 00:00:17 |
    |   9 |          NESTED LOOPS                       |                    |       |       |            |          |
    |  10 |           NESTED LOOPS                      |                    |     1 |   175 |  1305   (1)| 00:00:16 |
    |* 11 |            HASH JOIN                        |                    |     1 |   148 |  1304   (1)| 00:00:16 |
    |  12 |             JOIN FILTER CREATE              | :BF0000            |       |       |            |          |
    |  13 |              NESTED LOOPS                   |                    |       |       |            |          |
    |  14 |               NESTED LOOPS                  |                    |     1 |   134 |   967   (1)| 00:00:12 |
    |  15 |                NESTED LOOPS                 |                    |     1 |   103 |   964   (1)| 00:00:12 |
    |* 16 |                 TABLE ACCESS FULL           | PS_PROJECT         |   197 |  9062 |   278   (1)| 00:00:04 |
    |* 17 |                 TABLE ACCESS BY INDEX ROWID | PS_TL_PAYABLE_TIME |     1 |    57 |     7   (0)| 00:00:01 |
    |* 18 |                  INDEX RANGE SCAN           | IDX$$_C44D0007     |    16 |       |     3   (0)| 00:00:01 |
    |* 19 |                INDEX RANGE SCAN             | IDX$$_3F450003     |     1 |       |     2   (0)| 00:00:01 |
    |* 20 |               TABLE ACCESS BY INDEX ROWID   | PS_JOB             |     1 |    31 |     3   (0)| 00:00:01 |
    |  21 |             VIEW                            | PS_EMPLMT_SRCH_QRY |  5428 | 75992 |   336   (2)| 00:00:05 |
    PLAN_TABLE_OUTPUT
    |  22 |              SORT UNIQUE                    |                    |  5428 |   275K|   336   (2)| 00:00:05 |
    |* 23 |               FILTER                        |                    |       |       |            |          |
    |  24 |                JOIN FILTER USE              | :BF0000            | 55671 |  2827K|   335   (1)| 00:00:05 |
    |  25 |                 NESTED LOOPS                |                    | 55671 |  2827K|   335   (1)| 00:00:05 |
    |  26 |                  TABLE ACCESS BY INDEX ROWID| PSOPRDEFN          |     1 |    20 |     2   (0)| 00:00:01 |
    |* 27 |                   INDEX UNIQUE SCAN         | PS_PSOPRDEFN       |     1 |       |     1   (0)| 00:00:01 |
    |* 28 |                  TABLE ACCESS FULL          | PS_SJT_PERSON      | 55671 |  1739K|   333   (1)| 00:00:04 |
    |  29 |                CONCATENATION                |                    |       |       |            |          |
    |  30 |                 NESTED LOOPS                |                    |     1 |    63 |     2   (0)| 00:00:01 |
    |* 31 |                  INDEX FAST FULL SCAN       | PSASJT_OPR_CLS     |     1 |    24 |     2   (0)| 00:00:01 |
    |* 32 |                  INDEX UNIQUE SCAN          | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |  33 |                 NESTED LOOPS                |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |* 34 |                  INDEX UNIQUE SCAN          | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |* 35 |                  INDEX UNIQUE SCAN          | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |  36 |                NESTED LOOPS                 |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |* 37 |                 INDEX UNIQUE SCAN           | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |* 38 |                 INDEX UNIQUE SCAN           | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |* 39 |            INDEX UNIQUE SCAN                | PS_PERSONAL_DATA   |     1 |       |     0   (0)| 00:00:01 |
    |  40 |           TABLE ACCESS BY INDEX ROWID       | PS_PERSONAL_DATA   |     1 |    27 |     1   (0)| 00:00:01 |
    |* 41 |          INDEX FAST FULL SCAN               | PS_TL_GROUP_DTL    |   323 |  5814 |    47   (3)| 00:00:01 |
    |  42 |         VIEW                                | PS_PERALL_SEC_QRY  |  7940 | 87340 |   336   (2)| 00:00:05 |
    |  43 |          SORT UNIQUE                        |                    |  7940 |   379K|   336   (2)| 00:00:05 |
    |* 44 |           FILTER                            |                    |       |       |            |          |
    |* 45 |            FILTER                           |                    |       |       |            |          |
    |  46 |             NESTED LOOPS                    |                    | 55671 |  2663K|   335   (1)| 00:00:05 |
    |  47 |              TABLE ACCESS BY INDEX ROWID    | PSOPRDEFN          |     1 |    20 |     2   (0)| 00:00:01 |
    |* 48 |               INDEX UNIQUE SCAN             | PS_PSOPRDEFN       |     1 |       |     1   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |* 49 |              TABLE ACCESS FULL              | PS_SJT_PERSON      | 55671 |  1576K|   333   (1)| 00:00:04 |
    |  50 |            CONCATENATION                    |                    |       |       |            |          |
    |  51 |             NESTED LOOPS                    |                    |     1 |    63 |     2   (0)| 00:00:01 |
    |* 52 |              INDEX FAST FULL SCAN           | PSASJT_OPR_CLS     |     1 |    24 |     2   (0)| 00:00:01 |
    |* 53 |              INDEX UNIQUE SCAN              | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |  54 |             NESTED LOOPS                    |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |* 55 |              INDEX UNIQUE SCAN              | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |* 56 |              INDEX UNIQUE SCAN              | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |  57 |            CONCATENATION                    |                    |       |       |            |          |
    |  58 |             NESTED LOOPS                    |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |* 59 |              INDEX UNIQUE SCAN              | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |* 60 |              INDEX UNIQUE SCAN              | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |  61 |             NESTED LOOPS                    |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |* 62 |              INDEX UNIQUE SCAN              | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |* 63 |              INDEX UNIQUE SCAN              | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    |  64 |            NESTED LOOPS                     |                    |     1 |    63 |     3   (0)| 00:00:01 |
    |  65 |             INLIST ITERATOR                 |                    |       |       |            |          |
    |* 66 |              INDEX RANGE SCAN               | PSASJT_CLASS_ALL   |     1 |    39 |     2   (0)| 00:00:01 |
    |* 67 |             INDEX RANGE SCAN                | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |  68 |        TABLE ACCESS FULL                    | PS_TL_TRC_TBL      |   922 | 30426 |     6   (0)| 00:00:01 |
    |  69 |      SORT AGGREGATE                         |                    |     1 |    20 |            |          |
    |* 70 |       INDEX RANGE SCAN                      | PSAJOB             |     1 |    20 |     3   (0)| 00:00:01 |
    |  71 |      SORT AGGREGATE                         |                    |     1 |    14 |            |          |
    |* 72 |       INDEX RANGE SCAN                      | PS_TL_TRC_TBL      |     2 |    28 |     2   (0)| 00:00:01 |
    |  73 |      SORT AGGREGATE                         |                    |     1 |    23 |            |          |
    |* 74 |       INDEX RANGE SCAN                      | PSAJOB             |     1 |    23 |     3   (0)| 00:00:01 |
    |* 75 |     FILTER                                  |                    |       |       |            |          |
    PLAN_TABLE_OUTPUT
    |* 76 |      FILTER                                 |                    |       |       |            |          |
    |* 77 |       HASH JOIN                             |                    |     1 |   237 |   974   (2)| 00:00:12 |
    |* 78 |        HASH JOIN                            |                    |     1 |   226 |   637   (1)| 00:00:08 |
    |* 79 |         HASH JOIN                           |                    |     1 |   193 |   631   (1)| 00:00:08 |
    |  80 |          NESTED LOOPS                       |                    |       |       |            |          |
    |  81 |           NESTED LOOPS                      |                    |     1 |   179 |   294   (1)| 00:00:04 |
    |  82 |            NESTED LOOPS                     |                    |     1 |   152 |   293   (1)| 00:00:04 |
    |  83 |             NESTED LOOPS                    |                    |     1 |   121 |   290   (1)| 00:00:04 |
    |* 84 |              HASH JOIN SEMI                 |                    |     1 |    75 |   289   (1)| 00:00:04 |
    |* 85 |               TABLE ACCESS BY INDEX ROWID   | PS_TL_PAYABLE_TIME |     1 |    57 |   242   (0)| 00:00:03 |
    |* 86 |                INDEX SKIP SCAN              | IDX$$_C44D0007     |   587 |       |   110   (0)| 00:00:02 |
    |* 87 |               INDEX FAST FULL SCAN          | PS_TL_GROUP_DTL    |   323 |  5814 |    47   (3)| 00:00:01 |
    |* 88 |              TABLE ACCESS BY INDEX ROWID    | PS_PROJECT         |     1 |    46 |     1   (0)| 00:00:01 |
    |* 89 |               INDEX UNIQUE SCAN             | PS_PROJECT         |     1 |       |     0   (0)| 00:00:01 |
    |* 90 |             TABLE ACCESS BY INDEX ROWID     | PS_JOB             |     1 |    31 |     3   (0)| 00:00:01 |
    |* 91 |              INDEX RANGE SCAN               | IDX$$_3F450003     |     1 |       |     2   (0)| 00:00:01 |
    |* 92 |            INDEX UNIQUE SCAN                | PS_PERSONAL_DATA   |     1 |       |     0   (0)| 00:00:01 |
    |  93 |           TABLE ACCESS BY INDEX ROWID       | PS_PERSONAL_DATA   |     1 |    27 |     1   (0)| 00:00:01 |
    |  94 |          VIEW                               | PS_EMPLMT_SRCH_QRY |  5428 | 75992 |   336   (2)| 00:00:05 |
    |  95 |           SORT UNIQUE                       |                    |  5428 |   275K|   336   (2)| 00:00:05 |
    |* 96 |            FILTER                           |                    |       |       |            |          |
    |  97 |             NESTED LOOPS                    |                    | 55671 |  2827K|   335   (1)| 00:00:05 |
    |  98 |              TABLE ACCESS BY INDEX ROWID    | PSOPRDEFN          |     1 |    20 |     2   (0)| 00:00:01 |
    |* 99 |               INDEX UNIQUE SCAN             | PS_PSOPRDEFN       |     1 |       |     1   (0)| 00:00:01 |
    |*100 |              TABLE ACCESS FULL              | PS_SJT_PERSON      | 55671 |  1739K|   333   (1)| 00:00:04 |
    | 101 |             CONCATENATION                   |                    |       |       |            |          |
    | 102 |              NESTED LOOPS                   |                    |     1 |    63 |     2   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |*103 |               INDEX FAST FULL SCAN          | PSASJT_OPR_CLS     |     1 |    24 |     2   (0)| 00:00:01 |
    |*104 |               INDEX UNIQUE SCAN             | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 105 |              NESTED LOOPS                   |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |*106 |               INDEX UNIQUE SCAN             | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |*107 |               INDEX UNIQUE SCAN             | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 108 |             NESTED LOOPS                    |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |*109 |              INDEX UNIQUE SCAN              | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |*110 |              INDEX UNIQUE SCAN              | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 111 |         TABLE ACCESS FULL                   | PS_TL_TRC_TBL      |   922 | 30426 |     6   (0)| 00:00:01 |
    | 112 |        VIEW                                 | PS_PERALL_SEC_QRY  |  7940 | 87340 |   336   (2)| 00:00:05 |
    | 113 |         SORT UNIQUE                         |                    |  7940 |   379K|   336   (2)| 00:00:05 |
    |*114 |          FILTER                             |                    |       |       |            |          |
    |*115 |           FILTER                            |                    |       |       |            |          |
    | 116 |            NESTED LOOPS                     |                    | 55671 |  2663K|   335   (1)| 00:00:05 |
    | 117 |             TABLE ACCESS BY INDEX ROWID     | PSOPRDEFN          |     1 |    20 |     2   (0)| 00:00:01 |
    |*118 |              INDEX UNIQUE SCAN              | PS_PSOPRDEFN       |     1 |       |     1   (0)| 00:00:01 |
    |*119 |             TABLE ACCESS FULL               | PS_SJT_PERSON      | 55671 |  1576K|   333   (1)| 00:00:04 |
    | 120 |           CONCATENATION                     |                    |       |       |            |          |
    | 121 |            NESTED LOOPS                     |                    |     1 |    63 |     2   (0)| 00:00:01 |
    |*122 |             INDEX FAST FULL SCAN            | PSASJT_OPR_CLS     |     1 |    24 |     2   (0)| 00:00:01 |
    |*123 |             INDEX UNIQUE SCAN               | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 124 |            NESTED LOOPS                     |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |*125 |             INDEX UNIQUE SCAN               | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |*126 |             INDEX UNIQUE SCAN               | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 127 |           CONCATENATION                     |                    |       |       |            |          |
    | 128 |            NESTED LOOPS                     |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |*129 |             INDEX UNIQUE SCAN               | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |*130 |             INDEX UNIQUE SCAN               | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 131 |            NESTED LOOPS                     |                    |     1 |    63 |     1   (0)| 00:00:01 |
    |*132 |             INDEX UNIQUE SCAN               | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    |*133 |             INDEX UNIQUE SCAN               | PSASJT_CLASS_ALL   |     1 |    39 |     0   (0)| 00:00:01 |
    | 134 |           NESTED LOOPS                      |                    |     1 |    63 |     3   (0)| 00:00:01 |
    | 135 |            INLIST ITERATOR                  |                    |       |       |            |          |
    |*136 |             INDEX RANGE SCAN                | PSASJT_CLASS_ALL   |     1 |    39 |     2   (0)| 00:00:01 |
    |*137 |            INDEX RANGE SCAN                 | PSASJT_OPR_CLS     |     1 |    24 |     1   (0)| 00:00:01 |
    | 138 |      SORT AGGREGATE                         |                    |     1 |    20 |            |          |
    |*139 |       INDEX RANGE SCAN                      | PSAJOB             |     1 |    20 |     3   (0)| 00:00:01 |
    | 140 |      SORT AGGREGATE                         |                    |     1 |    14 |            |          |
    |*141 |       INDEX RANGE SCAN                      | PS_TL_TRC_TBL      |     2 |    28 |     2   (0)| 00:00:01 |
    | 142 |      SORT AGGREGATE                         |                    |     1 |    23 |            |          |
    |*143 |       INDEX RANGE SCAN                      | PSAJOB             |     1 |    23 |     3   (0)| 00:00:01 |
    | 144 |      SORT AGGREGATE                         |                    |     1 |    14 |            |          |
    |*145 |       INDEX RANGE SCAN                      | PS_TL_TRC_TBL      |     2 |    28 |     2   (0)| 00:00:01 |
    | 146 |      SORT AGGREGATE                         |                    |     1 |    20 |            |          |
    |*147 |       INDEX RANGE SCAN                      | PSAJOB             |     1 |    20 |     3   (0)| 00:00:01 |
    | 148 |      SORT AGGREGATE                         |                    |     1 |    23 |            |          |
    |*149 |       INDEX RANGE SCAN                      | PSAJOB             |     1 |    23 |     3   (0)| 00:00:01 |
    ------------------------------------------------------------------------------------------------------------------Most of the IO wait occur at step 17. Though exlain plan simply doesnot show this thing..But when we run this query from Peoplesoft application (online page), this is visible through Grid control SQL Monitoring
    Second part of the Question continues....

  • Why the query access path is different !

    Hi All
    I have a query which is running satisfactorily in TEST but is taking a long time in PROD.
    SELECT * FROM MTHLY_PROD_BASE WHERE START_DATE >= to_date('1/1/2013','mm/dd/yyyy') AND START_DATE < to_date('1/1/2014','mm/dd/yyyy')
    MTHLY_PROD_BASE is a view, containing some underlying tables and views which are doing summations and groupings of data.
    I have access plans for it in TEST and PROD in jpg format, but I am not able to attach here as the "Insert Image" button is inactive for me. How can I attach them for explaining my issue properly ?
    There was some memory added around a week ago to the DB server for improving performance of another database, but since then the DB in which I ran the query is performing poorly.
    Data for underlying tables, being referenced in the query, in TEST is same as in PROD, but the plans are different.
    I need to know what factors may cause the access path for a query to change, so that I can investigate what else might have got changed/impacted in PROD ?
    Thanks

    AnkitV wrote:
    Hi all
    1) version info of TEST and PROD:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE    11.2.0.2.0    Production"
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    2) Platform is Aix 6.1.0.0
    3) Query as mentioned in initial post too :SELECT * FROM MTHLY_PROD_BASE WHERE START_DATE >= to_date('1/1/2013','mm/dd/yyyy') AND START_DATE < to_date('1/1/2014','mm/dd/yyyy')
    4) As I mentioned, I do not have plan in text format, and its lots of lines in the
    I need to know what might be the reason for change in the access mode for the query in PROD, which has caused it to take 3-4 hrs instead of 30 mins ?
    Any help will be highly appreciated.
    different results occur when something is different between the two environments.
    Since we don't have access to either system, YOU are the only one who can actually compare & contrast between the two systems.
    HOW To Make TUNING request
    https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360003

  • Error when generating the SQL statement while running the Query

    Hello SDN Mates,
    Am using three cubes in one infoset and build a query on that. Intially it was running fine, but now am getting error generating the SQL statement. Can you please throw some light on this. Your idea would be highly appreciated.
    Thanks and Regards
    Arun S

    Hi Arun
    is there any change in the objects (Check also the consistency of infoobject ) included in infoset, just make sure those are active, open the query in designer and check if no error/warning message are present
    Thanks
    Tripple k

  • How to find System date in the query

    Hi,
    I have requirement where in the query I need to select the Document delivery date = today's date or system date.
    Can any once please let me know how to write the query?
    Murali

    Select * from ORDR where docduedate=convert(char(8), getdate(), 112)

  • Save the o/p of the query in Application Server, Filename with Timestamp

    Dear Experts,
    I have a scenario that on 1st of every month, a query needs to execute and save the output of that query in Application Server, Filename along with Timestamp.
    For ex: Production_19/09/2011
    So, I Created a Query Extract in RSCRM_REPORT and gave the path name and scheduled. The output of the query is saved successfully in Application Server.
    But I need Timestamp along with Filename.
    Please help me out with the timestamp issues, how could I include Timestamp with Filename (Query Name).
    Thanks,
    SAP BI

    Hi chaith,
    You can achieve the result with out any code. You have to use the APD concept to extract the query to a file.
    check the following link which help you to create a logical path
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e86545-9940-2d10-9f89-eb5bce1f9228?quicklink=index&overridelayout=true
    you can use the path in the APD.
    Regards,
    Ranganath

  • Where does the password for Elgamal algorithm is stored

    hi,
    i am doing a project in Intelligent security in java using Elagamal algorithm. The feature of Elgamal is that the password is not stored in database . Then where is the password is stored to check for a existing user .
    If i am an existing user then when i type the username and password then it should check or compare and tell that password is right or wrong . so where is the password is stored to compare ?? please give me the coding in java .
    i need the coding immediately , of how to get the password and to store and then to compare where the user is correct else message should display "type the correct password".
    Given below is my Main window coding plz help me where to include the coding,
         This simple extension of the java.awt.Frame class
         contains all the elements necessary to act as the
         main window of an application.
    // LOGIN WINDOW ( FIRST WINDOW ) FOR LOGIN AND EXISTING USER
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    import java.math.*;
    import java.security.*;
    import java.io.IOException;
    import javax.crypto.Cipher;
    import javax.crypto.IllegalBlockSizeException;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    public class Smart extends Frame
         public Smart()
              // This code is automatically generated by Visual Cafe when you add
              // components to the visual environment. It instantiates and initializes
              // the components. To modify the code, only use code syntax that matches
              // what Visual Cafe can generate, or Visual Cafe may be unable to back
              // parse your Java file into its visual environment.
              //{{INIT_CONTROLS
              setLayout(null);
              setBackground(new java.awt.Color(255,247,192));
              setSize(1200,900);
    // 157,135,178
              setVisible(false);
              label1.setText("USERID");
              add(label1);
              label1.setFont(new Font("Dialog", Font.PLAIN, 14));
              label1.setBounds(315,180,84,48);
              label2.setText("PASSWORD");
              add(label2);
              label2.setFont(new Font("Dialog", Font.PLAIN, 14));
              label2.setBounds(315,260,100,40);
              textField1.setBounds(430,180,216,36);
              //textField1.setBackground(new java.awt.Color(196,197,233));//textfieldcolor
              add(textField1);
              textField2.setEchoChar('*');
              //textField2.setBackground(new java.awt.Color(196,197,233));
              add(textField2);
              textField2.setBounds(430,260,213,36);
              button1.setLabel("SUBMIT");
              add(button1);
              button1.setBackground(new java.awt.Color(196,197,233));
              button1.setBounds(320,360,120,40);
              button2.setLabel("CLEAR");
              add(button2);
              button2.setBackground(new java.awt.Color(196,197,233));
              button2.setBounds(520,360,120,40);
              label3.setText("REGISTRATION FORM");
              add(label3);
              label3.setFont(new Font("Dialog", Font.BOLD, 20));
              label3.setBounds(324,54,550,80);
              button3.setLabel("NEW USER REGISTRATION");
              add(button3);
              button3.setBackground(new java.awt.Color(196,197,233));
              button3.setBounds(369,450,232,40);
              //add(textArea1);
              //textArea1.setBounds(0,360,576,52);
              setTitle("LOGIN PHASE Application");
              /*int mStrength = 16;
              SecureRandom mSecureRandom = new SecureRandom();
              p = new BigInteger(mStrength, 16, mSecureRandom);*/
              //{{INIT_MENUS
              //{{REGISTER_LISTENERS
              SymWindow aSymWindow = new SymWindow();
              this.addWindowListener(aSymWindow);
              SymAction lSymAction = new SymAction();
              button1.addActionListener(lSymAction);
              button2.addActionListener(lSymAction);
              button3.addActionListener(lSymAction);
         public Smart(String title)
              this();
              setTitle(title);
    * Shows or hides the component depending on the boolean flag b.
    * @param b if true, show the component; otherwise, hide the component.
    * @see java.awt.Component#isVisible
    public void setVisible(boolean b)
              if(b)
              setLocation(50, 50);
              super.setVisible(b);
         public static void main(String args[])
         try
                   //Create a new instance of our application's frame, and make it visible.
              (new Smart()).setVisible(true);
              catch (Throwable t)
                   System.err.println(t);
                   t.printStackTrace();
                   // Ensure the application exits with an error condition.
                   System.exit(1);
              public void addNotify()
              // Record the size of the window prior to calling parents addNotify.
              Dimension d = getSize();
              super.addNotify();
              if (fComponentsAdjusted)
                   return;
              // Adjust components according to the insets
              setSize(getInsets().left + getInsets().right + d.width, getInsets().top + getInsets().bottom + d.height);
              Component components[] = getComponents();
              for (int i = 0; i < components.length; i++)
                   Point p = components.getLocation();
                   p.translate(getInsets().left, getInsets().top);
                   components[i].setLocation(p);
              fComponentsAdjusted = true;
         // Used for addNotify check.
         boolean fComponentsAdjusted = false;
         //{{DECLARE_CONTROLS
         java.awt.Button button1 = new java.awt.Button();
         java.awt.Button button2 = new java.awt.Button();
         java.awt.Label label1 = new java.awt.Label();
         java.awt.Label label2 = new java.awt.Label();
         java.awt.Label label3 = new java.awt.Label();
         java.awt.Button button3 = new java.awt.Button();
         java.awt.TextField textField1 = new java.awt.TextField();
         java.awt.TextField textField2 = new java.awt.TextField();
         java.awt.TextArea textArea1 = new java.awt.TextArea();
         //BigInteger p;
         //{{DECLARE_MENUS
         class SymWindow extends java.awt.event.WindowAdapter
              public void windowClosing(java.awt.event.WindowEvent event)
                   Object object = event.getSource();
                   if (object == Smart.this)
                        Smart_WindowClosing(event);
         void Smart_WindowClosing(java.awt.event.WindowEvent event)
              System.exit(0);
         class SymAction implements java.awt.event.ActionListener
              public void actionPerformed(java.awt.event.ActionEvent event)
                   Object object = event.getSource();
                   if (object == button1)
                        button1_ActionPerformed(event);
                   else if (object == button2)
                        button2_ActionPerformed(event);
                   else if (object == button3)
                        button3_ActionPerformed(event);
         void button1_ActionPerformed(java.awt.event.ActionEvent event)
              //try{
              String ids = textField1.getText();
              String pss = textField2.getText();
              byte [] bt = ids.getBytes();
              BigInteger id = new BigInteger(bt);
              //by samy byte [] bts = pss.getBytes();
              //BigInteger ps = new BigInteger(bts);
         int mStrength = 16;
         SecureRandom mSecureRandom = new SecureRandom();
         BigInteger p = new BigInteger(mStrength, 16, mSecureRandom);
         System.out.println("p = "+p.toString(16));
         BigInteger g = new BigInteger(mStrength - 1, mSecureRandom);
         System.out.println("g= "+g.toString(16));
         BigInteger x = new BigInteger(mStrength - 1, mSecureRandom);
         System.out.println("x="+x.toString(16));
         //byte[] bt = id.getBytes();
         BigInteger idb = new BigInteger(bt);
         //System.out.println("id= "+idb.toString(16));
         BigInteger ps = idb.modPow(x, p);
         //String pw = new String("pass = "+ps.toByteArray());
         System.out.println("ps ="+ps.toString(16));
         BigInteger r =null;
    BigInteger ONE = BigInteger.valueOf(1L);
    BigInteger p_1 = p.subtract(ONE);
    SecureRandom sr = new SecureRandom();
    do {
    r = new BigInteger(p.bitLength(), sr);
    } while (r.compareTo(ONE) <= 0 || r.compareTo(p_1) >= 0);
         System.out.println("r= "+r.toString(16));
         BigInteger c1 =idb.modPow(r,p);
         System.out.println("c1= "+c1.toString(16));
         long time = System.currentTimeMillis();
         System.out.println("TIME ="+time);
         BigInteger one = new BigInteger( new Integer(1).toString());
         BigInteger T = new BigInteger( new Long(time).toString());
         BigInteger t =T.xor(ps);
         BigInteger t1 = t.mod(p.subtract(one));
         System.out.println("t="+t1.toString(16));
         BigInteger M = idb.modPow(t1, p);
         System.out.println("M="+M.toString(16));
         int rnd = r.intValue();
         BigInteger c2 =ps.modPow(r,p).multiply(M).mod(p);
         System.out.println("c2 ="+c2.toString(16));
         //(bia[0].modPow(a, p).modInverse(p)).multiply(bia[1]).mod(p);
         BigInteger val1 = (c1.modPow(x,p).modInverse(p)).multiply(c2).mod(p);
         BigInteger val2 = id.modPow(t1,p);
         System.out.println(val1.toString(16));
         System.out.println(val2.toString(16));
    send s=new send();
    // }catch( IOException e){
    //System.out.println("Exception caught ") ; }     
    //     catch( Exception e){
    //System.out.println("Exception caught ") ; }               
         void button2_ActionPerformed(java.awt.event.ActionEvent event)
              textField1.setText("");
              textField2.setText("");
         void button3_ActionPerformed(java.awt.event.ActionEvent event)
         {   Security s1 = null;
              try
    System.out.println("this is in Smart ");
         //Create a new instance of our application's frame, and make it visible.
              s1 = new Security();
              s1.setVisible(true);
              catch (Throwable t)
                   System.err.println(t);
                   t.printStackTrace();
                   //Ensure the application exits with an error condition.
                   System.exit(1);
              //s1.dispose();     

    I was picking that up from your error message
    ..jsp_servlet\__savename.java:17: package com.company.project.ejb does not exist import com.company.project.ejb.UserData; //[ /SaveName.jsp; Line: 1]
    The folder structure needs to mirror the package structure exactly (standard java)
    So yes, If you have a com.company.project.ejb package with a class UserData within it
    "UserData.class" needs to be in folder "WEB-INF/classes/com/project/ejb/"
    If you don't have that class, then check your import statement - its asking for it.
    Good luck,
    evnafets

Maybe you are looking for

  • Page Forward & Reverse buttons do not work & are "grayed-out" after upgrading to, as is the Main-Menu Items such as File-Edit-view etc...

    After upgrading to Firefox 3.6.12 all functionality appeared to be intact. Then after a few days it lost the ability to "page forward" or to "page back" and are "grayed-out". Additionally, the Main menu items such as File, Edit, View, History, Bookma

  • Using BEA Weblogic Portal with Sun Access Manager

    Hello all, I am wondering if anyone has had experience with using Weblogic Portal (versions 8.1 or 9.2) with Sun's Access Manager tool (part of the Identity Management suite). In particular, I would like to know what access control tasks were perform

  • Very slow macbook pro 2.2 Ghz OS X Mountain Lion

    Hi - since my update to Mountain Lion my Macbook Pro works rather slow. Any idea why this is and what could be done to solve this? Some Hardware information might help: OS X 10.8.2 MacBook Pro with 2.2 Ghz Intel Core 2 Duo 2GB 667 Mhz DDR2 SDRAM 100

  • HT201210 my phone wont sync as it says there is a missing file?

    My phone won't sync as it says it has a missing file. I just tried to update the latest operating system to save and update all my iphone data, it said it has incurred an unknown error & I need to restore my phone to original settings.... won't I los

  • CO-PC without PP

    Hi, I am trying to find out whether it is possible to implement Cost Object Controlling for Products without implementing Logistics Module Production Planning. As far as I know many structures from Production Planning, like Routing, BOM or Work Cente