Query runs in TOAD but hangs in Reports

How does one begin to diagnose where a query run in Reports is hanging? The query runs in TOAD but never finishes when run within the report. Strange thing is that the query/report ran (unchanged from this month) for prior months.
Is there a "run-time visual debugger" for reports?

Each query, including the 5th, runs to completion when run separately. It appears to be the addition of the 5th query which causes the problem.
NEWS FLASH: The report ran to completion over the weekend (almost totally idle server). However, it took over 90 minutes to finish.
Immediately after optimizing the queries and indicies, the report has been known to complete in 3 minutes. Over time, this has crept back up to 20 minutes.
The DBAs think a change in DBMS optimization might have caused this particular query to exceed a threshhold. They're looking at reversing this change to see the affect on the query.

Similar Messages

  • Report runs in Report Builder but hangs in Report Server

    Hi,
    I am using Oracle Reports 10g to build a report with many formula columns. Everything was working perfectly till I added some condition in a query in formula columns. After adding it, report is not working in Report Server but runs only in Report Builder. If I removed this condition, report runs OK but I need it. This condition is very simple, just filtering be a decoded column (i.e. stts = 'D')
    Can anyone suggest how to solve this problem?

    Hi,
    what is the application server version you are running your reports on?
    If it is 10.1.2.0.2 to 10.1.2.2  and you are using PDF SUBSETTING (check the [PDF:Subset] section in the uifont.ali file in your server) then you are most probably facing Bug:5029259 . To resolve the issue read further Doc ID 363868.1 in Oracle Support. In short, your options are:
    1. apply patchset 10.1.2.3 or maybe patch 5029259 is enough.
    2. or make sure no NULL values are returned in the report. Use nvl where possible. If there was no problem before making the changes then maybe checking the new formula columns would be enough. I made this change myself when facing this issue and it appears that this resolved the problem.
    3. or change REPORTS_ENHANCED_SUBSET to NO in windows registry if under windows or $ORACLE_HOME/bin/reports.sh if under linux.  REPORTS_ENHANCED_SUBSET=YES is necessary if you are using TTF subsetting, though. So this might not be an option.
    Julius Z

  • Why same query runs on isqlplus but not in Forms/Reports trigger

    Hi,
    I have one query in which I extract one column with parent table join if I run same query on isqlplus prompt it works but if I run same on Forms/Reports trigger it says found "select" where something else expected.
    below is an example .
    select em1.mreading, em1.grid_code,
    (select em.mreading from energy_mreading em where em.grid_code=em1.grid_code and em.transformer_code=em1.transformer_code
    and em.bus_bar=em1.bus_bar and to_date(to_char(em.r_date,'dd/mm/yyyy'),'dd/mm/yy') = to_date('02/01/07' ,'dd/mm/yy') - 1)
    as Yreading
    from energy_mreading em1
    where to_date(to_char(em1.r_date,'dd/mm/yyyy'),'dd/mm/yy')= to_date('02/01/07' ,'dd/mm/yy')
    Any one can help me, is there any restriction/limitations in Forms/Reports triggers.
    Thanks, Khawar.

    In forms and cursors you can not use scalar subqueries as you do. You have to use joins!
    select
         em1.mreading
        ,em1.grid_code
        ,em.mreading as Yreading
    from
        energy_mreading em1
       ,energy_mreading em
    where 1=1
        and trunc(em1.r_date) = to_date('02/01/2007','dd/mm/rrrr')
        and em.grid_code = em1.grid_code
        and em.transformer_code = em1.transformer_code
        and em.bus_bar = em1.bus_bar
        and trunc(em.r_date) = trunc(em1.r_date) - 1
    Try this, hope it works.

  • Query running in Quality but not in Production

    Hi Folks,
    we are running a query AQICSDUSERS=====MOVEMENTLIST4= which used to get executed previously,but all of a sudden now after running for an hour or so it is coming back to  sap easy access screen without displaying the report.It is running and giving the report in Quality but not in Production.
    What could be the reason?
    K.Kiran.

    Hi Folks,
    From DUMP I got this:-
    <b>You should usually execute long-running programs as batch jobs.
    If this is not possible, increase the system profile parameter
    "rdisp/max_wprun_time".</b>
    I want to know how to increase the system profile parameter
    "rdisp/max_wprun_time".
    Thanks,
    K.Kiran.

  • MDX query runs on SQL but does not populate 'Measures' in Powerpivot

    I ran MDX query on SQL 2012 for looking the products and their shipping status
    The code is given below:
    WITH 
    set Date1 AS 
         strtomember( "[Time].[2014].[Q4].[2014-Jun].[" +format(now()-2, "MM") + "/"+format(now()-2, "dd") + "/" +format(now()-2, "yyyy") + "]")
    set Item1 as
    { [Item].[ItemID].ALLMEMBERS}
    SELECT NON EMPTY { [Measures].[Shipped Qty], [Measures].[Shipped Amt], [Measures].[Ordered Qty], [Measures].[Ordered Amt] }
    ON COLUMNS, 
    Date1*[Item1] ON ROWS FROM [ABCD]
     WHERE ( 
                 [Channel].&[OL], 
                 [Geography].&[A.9])
    The query gives desired output when run in SQL. But when I run the same query in while pulling data in PowerPivot, Dimensions i.e. Date and Item are populated but measures were not populated. Can anyone please help me understand how to populated Measures
    in PowerPivot?
     

    Hi apoorv,
    It was hard to reproduce this issue on my test environment. I would suggest you try to use a simple MDX query to check if it will retrun the correct measures data. Please see the screenshot below:
    In addition, you can also create a SQL Server Analysis Services trace to capture some events for furhter investigation.
    Use SQL Server Profiler to Monitor Analysis Services:http://technet.microsoft.com/en-us/library/ms174946.aspx
    Hope this helps.
    Elvis Long
    TechNet Community Support

  • Create table runs in Toad but not in Linux

    Hello,
    I've just started writing in SQL 3 days ago so I would like to apologize in advance for the shabby code and the stupid question. I'm hoping that somebody can help me with my problem.
    Anyway, this has been bugging me for 2 days now and I can't seem to find the problem. The code below is just a simple create table that I coded in Toad for Oracle by Quest Software and runs fine in it but when I try to copy it over to our linux server and run it using '@/home/user/atm_dc.sql', the table is not created.
    Can someone help me?
    Thanks.
    drop table atm_dc;
    CREATE TABLE atm_dc
    AS (
    SELECT
    'I' as action_code,
    rpad(' ',22,' ') as card_num,
    rpad(' ',24,' ') as client_cd,
    '000119' as inst_cd,
    rpad(sa01mast.brncd,6,' ') as branch_cd,
    ' ' as vip_flag,
    ' ' as owner_cd,
    '0' as basic_card_flag,
    rpad(' ',22,' ') as basic_card_num,
    rpad(' ',4,' ') as title,
    case when length(cf01cif.sname) > 0 then
    rpad(cf01cif.sname,20,' ') else
    rpad(' ',20,' ') end as family_name,
    rpad(' ',20,' ') as first_name,
    rpad(' ',26,' ') as embossed_name,
    rpad(' ',26,' ') as encoded_name,
    case when length(cf01cif.maritsts) > 0 then
    case when cf01cif.maritsts in ('M') then '2' else '1' end else
    ' ' end as marital_status,
    case when length(cf01cif.sex) > 0 then
    case when cf01cif.sex in ('F') then 'F' else 'M' end else
    ' ' end as gender,
    rpad(' ',15,' ') as legal_id,
    '608' as nationality_code,
    '00' as num_of_children,
    rpad('0',12,'0') as credit_limit,
    '0' as issuers_client,
    ' ' as lodging_period,
    ' ' as res_status,
    rpad('0',12,'0') as net_yearly_income,
    '00' as no_of_dependents,
    case when length(cf01cif.birthdt) > 0 then
    to_char(cf01cif.birthdt,'YYYYMMDD') else rpad(' ',8,' ')
    end as birth_date,
    rpad(' ',5,' ') as birth_city,
    case when length(cf01cif.cntry) > 0 then
    rpad(cf01cif.cntry,3,' ') else rpad(' ',3,' ')
    end as birth_cntry,
    case when length(cf01addr.addr1) > 0 then
    rpad(substr(cf01addr.addr1,1,30),30,' ') else rpad(' ',30,' ')
    end as address1,
    case when length(cf01addr.addr2) > 0 then
    rpad(substr(cf01addr.addr2,1,30),30,' ') else rpad(' ',30,' ')
    end as address2,
    case when length(cf01addr.addr3) > 0 then
    rpad(substr(cf01addr.addr3,1,30),30,' ') else rpad(' ',30,' ')
    end as address3,
    case when length(cf01addr.addr4) > 0 then
    rpad(substr(cf01addr.addr4,1,30),30,' ') else rpad(' ',30,' ')
    end as address4,
    case when length(cf01addr.city) > 0 then
    rpad(substr(cf01addr.city,1,5),5,' ') else rpad(' ',5,' ')
    end as city_code,
    case when length(cf01addr.postcd) > 0 then
    rpad(cf01addr.postcd,10,' ') else rpad(' ',10,' ')
    end as zip_code,
    case when length(cf01addr.cntry) > 0 then
    rpad(cf01addr.cntry,3,' ') else
    rpad(' ',3,' ') end as country_code,
    rpad(' ',15,' ') as phone_no1,
    rpad(' ',15,' ') as phone_no2,
    rpad(' ',15,' ') as mobile_phone,
    rpad(' ',50,' ') as email_id,
    rpad(' ',40,' ') as employer,
    rpad(' ',30,' ') as emp_addr1,
    rpad(' ',30,' ') as emp_addr2,
    rpad(' ',30,' ') as emp_addr3,
    rpad(' ',30,' ') as emp_addr4,
    rpad(' ',5,' ') as emp_city_cd,
    rpad(' ',10,' ') as emp_zip_cd,
    rpad(' ',3,' ') as emp_cntry_cd,
    rpad(' ',8,' ') as cont_start_dt,
    ' ' as emp_status,
    to_char(sa01mast2.opendt,'YYYYMMDD') as open_dt,
    rpad(' ',8,' ') as start_val_dt,
    '001' as prod_code,
    '0' as delivery_mode,
    rpad(sa01mast.brncd||sa01mast.modcd||lpad(sa01mast.acno,6,'0')||
    lpad(sa01mast.chkdgt,2,'0'),24,' ') as account1,
    'PHP' as acct1_currency,
    case when sa01mast.crline in ('SA') then '10' else '20'
    end as account1_type,
    rpad(' ',12,' ') as limit_cash_dom,
    rpad(' ',12,' ') as limit_purch_dom,
    rpad(' ',12,' ') as limit_te_dom,
    rpad(' ',12,' ') as reserved1,
    rpad(' ',12,' ') as limit_cash_int,
    rpad(' ',12,' ') as limit_purch_int,
    rpad(' ',12,' ') as limit_te_int,
    rpad(' ',12,' ') as reserved2,
    rpad(' ',12,' ') as autho_limit_dom,
    rpad(' ',12,' ') as autho_limit_int,
    rpad(' ',12,' ') as reserved3,
    rpad(' ',4,' ') as activity_cd,
    rpad(' ',4,' ') as socio_prof_code,
    '00' status_code,
    rpad(' ',10,' ') as staff_id,
    '0' as delivery_flag,
    rpad(' ',8,' ') as delivery_date,
    rpad(' ',14,' ') as bank_dsa_ref,
    rpad(' ',50,' ') as ud_field1,
    rpad(' ',50,' ') as ud_field2,
    rpad(' ',50,' ') as ud_field3,
    rpad(' ',50,' ') as ud_field4,
    rpad(' ',50,' ') as ud_field5,
    rpad(' ',26,' ') as emboss_line3,
    rpad(' ',45,' ') as mailing_addr1,
    rpad(' ',45,' ') as mailing_addr2,
    rpad(' ',45,' ') as mailing_addr3,
    rpad(' ',45,' ') as mailing_addr4,
    rpad(' ',10,' ') as mailing_zip_code,
    rpad(' ',5,' ') as mailing_city_code,
    rpad(' ',3,' ') as mailing_country_code,
    rpad(' ',15,' ') as phone_home,
    rpad(' ',15,' ') as phone_alt,
    rpad(' ',15,' ') as phone_mobile,
    '0' as photo_indicator,
    ' ' as language_indicator,
    rpad(' ',25,' ') as maiden_name,
    rpad('0',8,'0') as check_sum
    FROM cf01cif, sa01mast, cf01addr, sa01mast2
    WHERE cf01cif.cifkey=sa01mast.cifkey and
         cf01cif.cifkey=cf01addr.cifkey and
    sa01mast2.brncd = sa01mast.brncd and
    sa01mast2.modcd = sa01mast.modcd and
    sa01mast2.acno = sa01mast.acno and
    sa01mast2.chkdgt = sa01mast.chkdgt and
              sa01mast2.opendt < sysdate
    );

    You can use the SPOOL command to create a output file. Run the below script. This will create a file "output.log". Check in the file for any error messages
    set echo on
    spool output.log
    drop table atm_dc
    CREATE TABLE atm_dc
    AS (
    SELECT
    'I' as action_code,
    rpad(' ',22,' ') as card_num,
    rpad(' ',24,' ') as client_cd,
    '000119' as inst_cd,
    rpad(sa01mast.brncd,6,' ') as branch_cd,
    ' ' as vip_flag,
    ' ' as owner_cd,
    '0' as basic_card_flag,
    rpad(' ',22,' ') as basic_card_num,
    rpad(' ',4,' ') as title,
    case when length(cf01cif.sname) > 0 then
    rpad(cf01cif.sname,20,' ') else
    rpad(' ',20,' ') end as family_name,
    rpad(' ',20,' ') as first_name,
    rpad(' ',26,' ') as embossed_name,
    rpad(' ',26,' ') as encoded_name,
    case when length(cf01cif.maritsts) > 0 then
    case when cf01cif.maritsts in ('M') then '2' else '1' end else
    ' ' end as marital_status,
    case when length(cf01cif.sex) > 0 then
    case when cf01cif.sex in ('F') then 'F' else 'M' end else
    ' ' end as gender,
    rpad(' ',15,' ') as legal_id,
    '608' as nationality_code,
    '00' as num_of_children,
    rpad('0',12,'0') as credit_limit,
    '0' as issuers_client,
    ' ' as lodging_period,
    ' ' as res_status,
    rpad('0',12,'0') as net_yearly_income,
    '00' as no_of_dependents,
    case when length(cf01cif.birthdt) > 0 then
    to_char(cf01cif.birthdt,'YYYYMMDD') else rpad(' ',8,' ')
    end as birth_date,
    rpad(' ',5,' ') as birth_city,
    case when length(cf01cif.cntry) > 0 then
    rpad(cf01cif.cntry,3,' ') else rpad(' ',3,' ')
    end as birth_cntry,
    case when length(cf01addr.addr1) > 0 then
    rpad(substr(cf01addr.addr1,1,30),30,' ') else rpad(' ',30,' ')
    end as address1,
    case when length(cf01addr.addr2) > 0 then
    rpad(substr(cf01addr.addr2,1,30),30,' ') else rpad(' ',30,' ')
    end as address2,
    case when length(cf01addr.addr3) > 0 then
    rpad(substr(cf01addr.addr3,1,30),30,' ') else rpad(' ',30,' ')
    end as address3,
    case when length(cf01addr.addr4) > 0 then
    rpad(substr(cf01addr.addr4,1,30),30,' ') else rpad(' ',30,' ')
    end as address4,
    case when length(cf01addr.city) > 0 then
    rpad(substr(cf01addr.city,1,5),5,' ') else rpad(' ',5,' ')
    end as city_code,
    case when length(cf01addr.postcd) > 0 then
    rpad(cf01addr.postcd,10,' ') else rpad(' ',10,' ')
    end as zip_code,
    case when length(cf01addr.cntry) > 0 then
    rpad(cf01addr.cntry,3,' ') else
    rpad(' ',3,' ') end as country_code,
    rpad(' ',15,' ') as phone_no1,
    rpad(' ',15,' ') as phone_no2,
    rpad(' ',15,' ') as mobile_phone,
    rpad(' ',50,' ') as email_id,
    rpad(' ',40,' ') as employer,
    rpad(' ',30,' ') as emp_addr1,
    rpad(' ',30,' ') as emp_addr2,
    rpad(' ',30,' ') as emp_addr3,
    rpad(' ',30,' ') as emp_addr4,
    rpad(' ',5,' ') as emp_city_cd,
    rpad(' ',10,' ') as emp_zip_cd,
    rpad(' ',3,' ') as emp_cntry_cd,
    rpad(' ',8,' ') as cont_start_dt,
    ' ' as emp_status,
    to_char(sa01mast2.opendt,'YYYYMMDD') as open_dt,
    rpad(' ',8,' ') as start_val_dt,
    '001' as prod_code,
    '0' as delivery_mode,
    rpad(sa01mast.brncd||sa01mast.modcd||lpad(sa01mast.acno,6,'0')||
    lpad(sa01mast.chkdgt,2,'0'),24,' ') as account1,
    'PHP' as acct1_currency,
    case when sa01mast.crline in ('SA') then '10' else '20'
    end as account1_type,
    rpad(' ',12,' ') as limit_cash_dom,
    rpad(' ',12,' ') as limit_purch_dom,
    rpad(' ',12,' ') as limit_te_dom,
    rpad(' ',12,' ') as reserved1,
    rpad(' ',12,' ') as limit_cash_int,
    rpad(' ',12,' ') as limit_purch_int,
    rpad(' ',12,' ') as limit_te_int,
    rpad(' ',12,' ') as reserved2,
    rpad(' ',12,' ') as autho_limit_dom,
    rpad(' ',12,' ') as autho_limit_int,
    rpad(' ',12,' ') as reserved3,
    rpad(' ',4,' ') as activity_cd,
    rpad(' ',4,' ') as socio_prof_code,
    '00' status_code,
    rpad(' ',10,' ') as staff_id,
    '0' as delivery_flag,
    rpad(' ',8,' ') as delivery_date,
    rpad(' ',14,' ') as bank_dsa_ref,
    rpad(' ',50,' ') as ud_field1,
    rpad(' ',50,' ') as ud_field2,
    rpad(' ',50,' ') as ud_field3,
    rpad(' ',50,' ') as ud_field4,
    rpad(' ',50,' ') as ud_field5,
    rpad(' ',26,' ') as emboss_line3,
    rpad(' ',45,' ') as mailing_addr1,
    rpad(' ',45,' ') as mailing_addr2,
    rpad(' ',45,' ') as mailing_addr3,
    rpad(' ',45,' ') as mailing_addr4,
    rpad(' ',10,' ') as mailing_zip_code,
    rpad(' ',5,' ') as mailing_city_code,
    rpad(' ',3,' ') as mailing_country_code,
    rpad(' ',15,' ') as phone_home,
    rpad(' ',15,' ') as phone_alt,
    rpad(' ',15,' ') as phone_mobile,
    '0' as photo_indicator,
    ' ' as language_indicator,
    rpad(' ',25,' ') as maiden_name,
    rpad('0',8,'0') as check_sum
    FROM cf01cif, sa01mast, cf01addr, sa01mast2
    WHERE cf01cif.cifkey=sa01mast.cifkey and
    cf01cif.cifkey=cf01addr.cifkey and
    sa01mast2.brncd = sa01mast.brncd and
    sa01mast2.modcd = sa01mast.modcd and
    sa01mast2.acno = sa01mast.acno and
    sa01mast2.chkdgt = sa01mast.chkdgt and
    sa01mast2.opendt < sysdate
    spool off

  • App created w/ JDev 11.1.1.3.0 and ADF runs in Firefox, but hangs in IE

    This was accidentally posted here. How do I remove it?
    We are absolute newbies to JDev and ADF. We are running on Windows XP v2002 SP3.
    We re-created the demo app that Shay Shmeltzer gives entitled "The JDeveloper 11g Developer Experience". The app that we've created runs as expected in Firefox 3.3.6. When we try to run it in IE 7, it displays one record only and then hangs.
    We have another error that may be related. When we first installed and fired it up, we did not get this. It's only happened since we did the demo. When JDev first comes up now, we are getting a message stating "An unexpected severe error occurred in JDeveloper". Not knowing what else to do, we have just clicked "continue". Perhaps we should do something else?
    Edited by: user1196829 on Jul 19, 2010 12:58 PM

    When the application gets stuck - is there any error reported in the Weblogic log window?
    In your IE - do you have XMLHttpRequest enabled?

  • Query running real slow or hangs

    Experts,
    Please help in tuning this query
    We have PART_B.part_b_fact_stage table which has around 1100 Million Rows else table that are joined has 30-40 Million rows Or more that that . Here is the query and explain plan
    SELECT /*+ PARALLEL(fs) PARALLEL(ds) PARALLEL(hd) PARALLEL(cpd) PARALLEL(c)
    fs.rowid,
    c.bene_clm_num_equated,
    fs.carr_clm_cntl_num,
    fs.run_dt,
    fs.hse_cwf_clm_acrtn_dt,
    fs.hse_cwf_clm_acrtn_num,
    hd.hcpcs_cd,
    cpd.line_prcsg_ind,
    fs.carr_clm_alowed_chrg_amt,
    fs.hcfa_clm_proc_dt
    FROM (select /*+parallel(stg) */
    from PART_B.part_b_fact_stage stg
    where stg.not_final_id = 1) fs,
    PART_B.part_b_clm_b_distinct_stage ds,
    PART_B.hcpcs_dimension hd,
    PART_B.CARRIER_PROCESSING_DIMENSION CPD,
    PART_B.Ptb_Bene_At_Time_Clm c
    WHERE fs.carr_clm_cntl_num = ds.carr_clm_cntl_num
    AND fs.hcpcs_id = hd.hcpcs_id
    AND fs.carr_prcsg_id = cpd.carr_prcsg_id
    AND c.ptb_bene_at_time_clm_id = fs.ptb_bene_at_time_clm_id
    AND c.bene_clm_num_equated = ds.bene_clm_num_equated
    PLAN_TABLE_OUTPUT
    Plan hash value: 441158526
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 1 | 144 | | 204K (2)| 00:47:48 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10004 | 1 | 144 | | 204K (2)| 00:47:48 | | | Q1,04 | P->S | QC (RAND) |
    | 3 | BUFFER SORT | | 1 | 144 | | | | | | Q1,04 | PCWP | |
    | 4 | NESTED LOOPS | | 1 | 144 | | 204K (2)| 00:47:48 | | | Q1,04 | PCWP | |
    | 5 | NESTED LOOPS | | 1 | 137 | | 204K (2)| 00:47:48 | | | Q1,04 | PCWP | |
    |* 6 | HASH JOIN | | 1 | 125 | 155M| 204K (2)| 00:47:48 | | | Q1,04 | PCWP | |
    | 7 | PX RECEIVE | | 45M| 1976M| | 13043 (2)| 00:03:03 | | | Q1,04 | PCWP | |
    | 8 | PX SEND HASH | :TQ10002 | 45M| 1976M| | 13043 (2)| 00:03:03 | | | Q1,02 | P->P | HASH |
    |* 9 | HASH JOIN BUFFERED | | 45M| 1976M| 83M| 13043 (2)| 00:03:03 | | | Q1,02 | PCWP | |
    | 10 | PX RECEIVE | | 45M| 816M| | 1759 (3)| 00:00:25 | | | Q1,02 | PCWP | |
    | 11 | PX SEND HASH | :TQ10000 | 45M| 816M| | 1759 (3)| 00:00:25 | | | Q1,00 | P->P | HASH |
    | 12 | PX BLOCK ITERATOR | | 45M| 816M| | 1759 (3)| 00:00:25 | | | Q1,00 | PCWC | |
    | 13 | TABLE ACCESS FULL | PTB_BENE_AT_TIME_CLM | 45M| 816M| | 1759 (3)| 00:00:25 | | | Q1,00 | PCWP | |
    | 14 | PX RECEIVE | | 60M| 1556M| | 1656 (3)| 00:00:24 | | | Q1,02 | PCWP | |
    | 15 | PX SEND HASH | :TQ10001 | 60M| 1556M| | 1656 (3)| 00:00:24 | | | Q1,01 | P->P | HASH |
    | 16 | PX BLOCK ITERATOR | | 60M| 1556M| | 1656 (3)| 00:00:24 | | | Q1,01 | PCWC | |
    | 17 | TABLE ACCESS FULL | PART_B_CLM_B_DISTINCT_STAGE | 60M| 1556M| | 1656 (3)| 00:00:24 | | | Q1,01 | PCWP | |
    | 18 | PX RECEIVE | | 512M| 37G| | 66006 (4)| 00:15:25 | | | Q1,04 | PCWP | |
    | 19 | PX SEND HASH | :TQ10003 | 512M| 37G| | 66006 (4)| 00:15:25 | | | Q1,03 | P->P | HASH |
    | 20 | PX BLOCK ITERATOR | | 512M| 37G| | 66006 (4)| 00:15:25 | 1 | LAST | Q1,03 | PCWC | |
    |* 21 | TABLE ACCESS FULL | PART_B_FACT_STAGE | 512M| 37G| | 66006 (4)| 00:15:25 | 1 | 1236 | Q1,03 | PCWP | |
    | 22 | TABLE ACCESS BY INDEX ROWID| HCPCS_DIMENSION | 1 | 12 | | 1 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    |* 23 | INDEX UNIQUE SCAN | PK_HCPCSD_ID | 1 | | | 1 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    | 24 | TABLE ACCESS BY INDEX ROWID | CARRIER_PROCESSING_DIMENSION | 1 | 7 | | 1 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    |* 25 | INDEX UNIQUE SCAN | PK_CPD_CARRIER_ID | 1 | | | 1 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    Query Block Name / Object Alias (identified by operation id):
    1 - SEL$F5BB74E1
    13 - SEL$F5BB74E1 / C@SEL$1
    17 - SEL$F5BB74E1 / DS@SEL$1
    21 - SEL$F5BB74E1 / STG@SEL$2
    22 - SEL$F5BB74E1 / HD@SEL$1
    23 - SEL$F5BB74E1 / HD@SEL$1
    24 - SEL$F5BB74E1 / CPD@SEL$1
    25 - SEL$F5BB74E1 / CPD@SEL$1
    Predicate Information (identified by operation id):
    6 - access("STG"."CARR_CLM_CNTL_NUM"="DS"."CARR_CLM_CNTL_NUM" AND "C"."PTB_BENE_AT_TIME_CLM_ID"="STG"."PTB_BENE_AT_TIME_CLM_ID")
    9 - access("C"."BENE_CLM_NUM_EQUATED"="DS"."BENE_CLM_NUM_EQUATED")
    21 - filter("STG"."NOT_FINAL_ID"=1)
    23 - access("STG"."HCPCS_ID"="HD"."HCPCS_ID")
    25 - access("STG"."CARR_PRCSG_ID"="CPD"."CARR_PRCSG_ID")
    Column Projection Information (identified by operation id):
    1 - "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],
    "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22],
    "HD"."HCPCS_CD"[VARCHAR2,5], "CPD"."LINE_PRCSG_IND"[VARCHAR2,1]
    2 - (#keys=0) "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],
    "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22],
    "HD"."HCPCS_CD"[VARCHAR2,5], "CPD"."LINE_PRCSG_IND"[VARCHAR2,1]
    3 - (#keys=0) "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],
    "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22],
    "HD"."HCPCS_CD"[VARCHAR2,5], "CPD"."LINE_PRCSG_IND"[VARCHAR2,1]
    4 - (#keys=0) "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],
    "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22],
    "HD"."HCPCS_CD"[VARCHAR2,5], "CPD"."LINE_PRCSG_IND"[VARCHAR2,1]
    5 - (#keys=0) "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "STG"."CARR_PRCSG_ID"[NUMBER,22],
    "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22],
    "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22], "HD"."HCPCS_CD"[VARCHAR2,5]
    6 - (#keys=2) "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "STG"."CARR_PRCSG_ID"[NUMBER,22],
    "STG"."HCPCS_ID"[NUMBER,22], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7],
    "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]
    7 - "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]
    8 - (#keys=2) "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]
    9 - (#keys=1) "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]
    10 - "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22]
    11 - (#keys=1) "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22]
    12 - "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]
    13 - "C"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]
    14 - "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]
    15 - (#keys=1) "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]
    16 - "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]
    17 - "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]
    18 - "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "STG"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "FS".ROWID[ROWID,10], "STG"."CARR_PRCSG_ID"[NUMBER,22],
    "STG"."HCPCS_ID"[NUMBER,22], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7],
    "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]
    19 - (#keys=2) "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "STG"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22], "FS".ROWID[ROWID,10], "STG"."CARR_PRCSG_ID"[NUMBER,22],
    "STG"."HCPCS_ID"[NUMBER,22], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7],
    "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]
    20 - "FS".ROWID[ROWID,10], "STG"."CARR_PRCSG_ID"[NUMBER,22], "STG"."HCPCS_ID"[NUMBER,22], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],
    "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15],
    "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22], "STG"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22]
    21 - "FS".ROWID[ROWID,10], "STG"."CARR_PRCSG_ID"[NUMBER,22], "STG"."HCPCS_ID"[NUMBER,22], "STG"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],
    "STG"."HCFA_CLM_PROC_DT"[DATE,7], "STG"."RUN_DT"[DATE,7], "STG"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "STG"."CARR_CLM_CNTL_NUM"[VARCHAR2,15],
    "STG"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22], "STG"."PTB_BENE_AT_TIME_CLM_ID"[NUMBER,22]
    22 - "HD"."HCPCS_CD"[VARCHAR2,5]
    23 - "HD".ROWID[ROWID,10]
    24 - "CPD"."LINE_PRCSG_IND"[VARCHAR2,1]
    25 - "CPD".ROWID[ROWID,10]
    102 rows selected

    While eleminiting other tables and found that this particular is taking time. This query never come up
    SELECT /*+ PARALLEL(fs) PARALLEL(c) parallel(ds)
    index(c,PK_PTB_BENE_AT_TIME) full(ds) index(cpd,PK_CPD_CARRIER_ID)
    fs.rowid,
    c.bene_clm_num_equated,
    fs.carr_clm_cntl_num,
    fs.run_dt,
    fs.hse_cwf_clm_acrtn_dt,
    fs.hse_cwf_clm_acrtn_num,
    fs.carr_clm_alowed_chrg_amt,
    fs.hcfa_clm_proc_dt
      FROM PART_B.part_b_fact_stage           fs,
           PART_B.part_b_clm_b_distinct_stage ds,
           PART_B.Ptb_Bene_At_Time_Clm        c
    WHERE fs.not_final_id = 1
       and fs.carr_clm_cntl_num = ds.carr_clm_cntl_num
       AND c.bene_clm_num_equated = ds.bene_clm_num_equated
    PLAN_TABLE_OUTPUT                                                                                                                               
    Plan hash value: 2589723726                                                                                                                               
    | Id  | Operation                            | Name                        | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |                                                                                                                               
    |   0 | SELECT STATEMENT                     |                             |    45M|  4342M|       |    24M  (1)| 95:50:27 |       |       |        |      |            |                                                                                                                               
    |   1 |  PX COORDINATOR                      |                             |       |       |       |            |          |       |       |        |      |            |                                                                                                                               
    |   2 |   PX SEND QC (RANDOM)                | :TQ10004                    |    45M|  4342M|       |    24M  (1)| 95:50:27 |       |       |  Q1,04 | P->S | QC (RAND)  |                                                                                                                               
    |*  3 |    HASH JOIN BUFFERED                |                             |    45M|  4342M|   137M|    24M  (1)| 95:50:27 |       |       |  Q1,04 | PCWP |            |                                                                                                                               
    |   4 |     PX RECEIVE                       |                             |    45M|  1676M|       |    24M  (1)| 95:11:05 |       |       |  Q1,04 | PCWP |            |                                                                                                                               
    |   5 |      PX SEND HASH                    | :TQ10002                    |    45M|  1676M|       |    24M  (1)| 95:11:05 |       |       |  Q1,02 | P->P | HASH       |                                                                                                                               
    |*  6 |       HASH JOIN BUFFERED             |                             |    45M|  1676M|    64M|    24M  (1)| 95:11:05 |       |       |  Q1,02 | PCWP |            |                                                                                                                               
    |   7 |        BUFFER SORT                   |                             |       |       |       |            |          |       |       |  Q1,02 | PCWC |            |                                                                                                                               
    |   8 |         PX RECEIVE                   |                             |    45M|   515M|       |    24M  (1)| 95:08:38 |       |       |  Q1,02 | PCWP |            |                                                                                                                               
    |   9 |          PX SEND HASH                | :TQ10000                    |    45M|   515M|       |    24M  (1)| 95:08:38 |       |       |        | S->P | HASH       |                                                                                                                               
    |  10 |           TABLE ACCESS BY INDEX ROWID| PTB_BENE_AT_TIME_CLM        |    45M|   515M|       |    24M  (1)| 95:08:38 |       |       |        |      |            |                                                                                                                               
    |  11 |            INDEX FULL SCAN           | PK_PTB_BENE_AT_TIME         |    45M|       |       | 16127   (3)| 00:03:46 |       |       |        |      |            |                                                                                                                               
    |  12 |        PX RECEIVE                    |                             |    60M|  1565M|       |  1656   (3)| 00:00:24 |       |       |  Q1,02 | PCWP |            |                                                                                                                               
    |  13 |         PX SEND HASH                 | :TQ10001                    |    60M|  1565M|       |  1656   (3)| 00:00:24 |       |       |  Q1,01 | P->P | HASH       |                                                                                                                               
    |  14 |          PX BLOCK ITERATOR           |                             |    60M|  1565M|       |  1656   (3)| 00:00:24 |       |       |  Q1,01 | PCWC |            |                                                                                                                               
    |  15 |           TABLE ACCESS FULL          | PART_B_CLM_B_DISTINCT_STAGE |    60M|  1565M|       |  1656   (3)| 00:00:24 |       |       |  Q1,01 | PCWP |            |                                                                                                                               
    |  16 |     PX RECEIVE                       |                             |   512M|    29G|       | 65908   (4)| 00:15:23 |       |       |  Q1,04 | PCWP |            |                                                                                                                               
    |  17 |      PX SEND HASH                    | :TQ10003                    |   512M|    29G|       | 65908   (4)| 00:15:23 |       |       |  Q1,03 | P->P | HASH       |                                                                                                                               
    |  18 |       PX BLOCK ITERATOR              |                             |   512M|    29G|       | 65908   (4)| 00:15:23 |     1 |  LAST |  Q1,03 | PCWC |            |                                                                                                                               
    |* 19 |        TABLE ACCESS FULL             | PART_B_FACT_STAGE           |   512M|    29G|       | 65908   (4)| 00:15:23 |     1 |  1236 |  Q1,03 | PCWP |            |                                                                                                                               
    Query Block Name / Object Alias (identified by operation id):                                                                                                                               
    1 - SEL$1                                                                                                                               
    10 - SEL$1 / C@SEL$1                                                                                                                               
    11 - SEL$1 / C@SEL$1                                                                                                                               
    15 - SEL$1 / DS@SEL$1                                                                                                                               
    19 - SEL$1 / FS@SEL$1                                                                                                                               
    Predicate Information (identified by operation id):                                                                                                                               
    3 - access("FS"."CARR_CLM_CNTL_NUM"="DS"."CARR_CLM_CNTL_NUM")                                                                                                                               
    6 - access("C"."BENE_CLM_NUM_EQUATED"="DS"."BENE_CLM_NUM_EQUATED")                                                                                                                               
    19 - filter("FS"."NOT_FINAL_ID"=1)                                                                                                                               
    Column Projection Information (identified by operation id):                                                                                                                               
    1 - "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],                                                                                                                               
    "FS"."HCFA_CLM_PROC_DT"[DATE,7], "FS"."RUN_DT"[DATE,7], "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    2 - (#keys=0) "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],                                                                                                                               
    "FS"."HCFA_CLM_PROC_DT"[DATE,7], "FS"."RUN_DT"[DATE,7], "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    3 - (#keys=1) "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7],                                                                                                                               
    "FS"."HCFA_CLM_PROC_DT"[DATE,7], "FS"."RUN_DT"[DATE,7], "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    4 - "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]                                                                                                                               
    5 - (#keys=1) "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]                                                                                                                               
    6 - (#keys=1) "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]                                                                                                                               
    7 - (#keys=0) "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]                                                                                                                               
    8 - "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]                                                                                                                               
    9 - (#keys=1) "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]                                                                                                                               
    10 - "C"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12]                                                                                                                               
    11 - "C".ROWID[ROWID,10]                                                                                                                               
    12 - "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]                                                                                                                               
    13 - (#keys=1) "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]                                                                                                                               
    14 - "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]                                                                                                                               
    15 - "DS"."BENE_CLM_NUM_EQUATED"[VARCHAR2,12], "DS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15]                                                                                                                               
    16 - "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "FS"."HCFA_CLM_PROC_DT"[DATE,7], "FS"."RUN_DT"[DATE,7],                                                                                                                               
    "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    17 - (#keys=1) "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "FS"."HCFA_CLM_PROC_DT"[DATE,7],                                                                                                                               
    "FS"."RUN_DT"[DATE,7], "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    18 - "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "FS"."HCFA_CLM_PROC_DT"[DATE,7], "FS"."RUN_DT"[DATE,7],                                                                                                                               
    "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    19 - "FS".ROWID[ROWID,10], "FS"."HSE_CWF_CLM_ACRTN_DT"[DATE,7], "FS"."HCFA_CLM_PROC_DT"[DATE,7], "FS"."RUN_DT"[DATE,7],                                                                                                                               
    "FS"."HSE_CWF_CLM_ACRTN_NUM"[NUMBER,22], "FS"."CARR_CLM_CNTL_NUM"[VARCHAR2,15], "FS"."CARR_CLM_ALOWED_CHRG_AMT"[NUMBER,22]                                                                                                                               
    72 rows selected

  • This query works in TOAD but not in forms 6i,

    Hi,
    It shows error identifier 'ATTRIBUTES' must be declared. what is this error about ?
    BEGIN
    select distinct B.TEXT into v_lbl
    from
    SAMS S, TABLE(ATTRIBUTES) A, TABLE(ATTRIBUTES) B, LOCATIONS LS
    where
    S.ID = :P_ ID and
    A.NAME = 'DISL' and
    B.NAME='BL'
    SL.ID(+) = S.ID and
    SL.STAT(+) = 'HIGH' ;
    return(v_lbl);
    END;
    Thanks
    Bcj

    returning valueswhat values? 1 or more?
    when i compile it shows the errorwhat's the error?

  • SQL query performance between TOAD and APEX

    Hi Guys,
    I would like to know if there is any performance difference between a simple query run in TOAD and APEX(classic report).
    The reason being, I have a query based on a single table(conataining 15000 rows) which takes almost 30seconds in APEX whereas it takes just 2-3 seconds in TOAD.
    Thanks,
    Raj.

    Varad,
    Thanks for your suggestion.
    I tried changing the pagination but not much it helped.
    Basically I have 5 reports on the same page.
    When the user first navigates to this page then Report-1 is generated first with data as links to other reports.
    So I guess when I click on any of the column links on the Report-1 then the page is refreshed and this time its taking total time for Report-1 and Report-2.
    Is there a possibility that we can circumvent the execution of the first query or cache the results of report-1 so that when the page is refreshed it displays the data from the cache for Report-1 and executes the query for Report-2 ?
    -Raj

  • Query runs for ever

    I have three summary tables which are yearly,monthly and daily. The yearly table has year and some aggreagted facts. The monthly table has year,month and some aggregated facts while day table has year,month and day and some aggregated facts.
    I ran a Query on yearly table and monthly table with a join on year for these fields
    Year(year from yearly table)
    month and some aggregated facts (monthly table). This query runs forever. But if I pull all these fields from monthly table it runs fast. Can I join on year to pull the data. I dont have any keys in these tables.

    Query from different tables:
    SELECT
    PMAC.ACT_ALL_SUM_YEAR.DEPT_AIRPORT,
    PMAC.ACT_ALL_SUM_YEAR.ARR_AIRPORT,
    (PMAC.ACT_ALL_SUM_YEAR.DATE_YEAR),
    PMAC.ACT_ALL_SUM_MONTH.AVG_AIRB,
    (PMAC.ACT_ALL_SUM_MONTH.DATE_MONTH)
    FROM
    PMAC.ACT_ALL_SUM_YEAR,
    PMAC.ACT_ALL_SUM_MONTH,
    PMAC.ACT_ALL_SUM_DAY
    WHERE
    ( PMAC.ACT_ALL_SUM_YEAR.DATE_YEAR=PMAC.ACT_ALL_SUM_DAY.DATE_YEAR )
    AND ( PMAC.ACT_ALL_SUM_DAY.DATE_YEAR=PMAC.ACT_ALL_SUM_MONTH.DATE_YEAR )
    AND
    PMAC.ACT_ALL_SUM_YEAR.DEPT_AIRPORT = 'ATL'
    AND
    PMAC.ACT_ALL_SUM_YEAR.ARR_AIRPORT = 'JFK'
    AND
    (PMAC.ACT_ALL_SUM_YEAR.DATE_YEAR) In ( '2001','2002','2003' )
    )Query to pull data from single table:
    SELECT
      PMAC.ACT_ALL_SUM_MONTH.AVG_AIRB,
      (PMAC.ACT_ALL_SUM_MONTH.DATE_MONTH),
      PMAC.ACT_ALL_SUM_MONTH.ARR_AIRPORT,
      PMAC.ACT_ALL_SUM_MONTH.DEPT_AIRPORT,
      (PMAC.ACT_ALL_SUM_MONTH.DATE_YEAR)
    FROM
      PMAC.ACT_ALL_SUM_MONTH
    WHERE
       PMAC.ACT_ALL_SUM_MONTH.DEPT_AIRPORT  =  'ATL'
       AND
       PMAC.ACT_ALL_SUM_MONTH.ARR_AIRPORT  =  'JFK'
       AND
       (PMAC.ACT_ALL_SUM_MONTH.DATE_YEAR)  In  ( '2001','2002','2003'  )
      )These are two queries which I was working on. The first query takes too much time to run and it runs fast on the second query. How can I optimise the first query. Can we include any keys in these tables to make the query faster.
    Edited by: user9518444 on Dec 3, 2008 7:34 AM
    Edited by: user9518444 on Dec 3, 2008 7:38 AM

  • Strange problem... Query runs faster, but report runs slow...

    Hi Gurus,
    We are using Report 10g on 10g Application server and solaris. we created a report on a table which has 10,000 rows. The report has 25 columns. when we run this query in Toad it took 12 sec for fetching all these 10,000 rows
    But when we run the report with Destype = 'FILE' and Desformat = 'DELIMITEDDDATA', it is taking 5 to 8 minutes
    to open in excel ( we concatenated mimetype=vnd-msexcel at the end of the url if the Destype=FILE). We removed the layout in the report as it is taking 10 to 15 mins to run to Screen with Desformat=HTML/PDF(formating pages taking more time). We are wondering why DELIMITEDDATA format is taking long time as it runs only query.
    Does RWSERVLET take more time of writing the data to the Physical file in the cache dir? Our cache size is 1 GB. we have 2 report servers clustered. Tracing is off.
    Please advise me if there are any report server settings to boost the performance.
    Thanks alot,
    Ram.

    Duplicate of Strange problem... Query runs faster, but report runs slow... in the Reports forum.
    [Thread closed]

  • SSRS 2008 R2 is extremely slow. The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes. I have read this is a bug in SSRS 2008 R2. We installed the most recent patches and service packs.

    SSRS 2008 R2 is extremely slow.  The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes.  I have read this is a bug in SSRS 2008 R2.  We installed the most recent patches and
    service packs.  Nothing we've done so far has fixed it and I see that I'm not the only person with this problem.  However I don't see any answers either.

    Hi Kim Sharp,
    According to your description that when you view the report it is extremely slow in SSRS 2008 R2 but it is very fast when execute the query in dataset designer, right?
    I have tested on my local environment and can‘t reproduce the issue. Obviously, it is the performance issue, rendering performance can be affected by a combination of factors that include hardware, number of concurrent users accessing reports, the amount
    of data in a report, design of the report, and output format. If you have parameters in your report which contains many values in the list, the bad performance as you mentioned is an known issue on 2008 R2 and already have the hotfix:
    http://support.microsoft.com/kb/2276203
    Any issue after applying the update, I recommend you that submit a feedback at https://connect.microsoft.com/SQLServer/ 
    If you don’t have, you can do some action to improve the performance when designing the report. Because how you create and update reports affects how fast the report renders.
    Actually, the Report Server ExecutionLog2  view contains reports performance data. You could make use of below query to see where the report processing time is being spent:
    After you determine whether the delay time is in data retrieval, report processing, or report rendering:
    use ReportServer
    SELECT TOP 10 ReportPath,parameters,
    TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering,
    ByteCount, [RowCount],Source, AdditionalInfo
    FROM ExecutionLog2
    ORDER BY Timestart DESC
    Use below methods to help troubleshoot issues according to the above query result :
    Troubleshooting Reports: Report Performance
    Besides this, you could also follow these articles for more information about this issue:
    Report Server Catalog Best Practices
    Performance, Snapshots, Caching (Reporting Services)
    Similar thread for your reference:
    SSRS slow
    Any problem, please feel free to ask
    Regards
    Vicky Liu

  • SSRS report running very slow but query is very fast in SSMS

    I am running a very basic report. I am just retrieving some data from a table and I am using a parameter in the Where clause of the query. The query runs fast (in less than 5 secs) if I hardcode the parameter in the SSRS query but if it's left as a dynamically
    chosen parameter the query takes over 5 minutes to render. I have read a little about "Parameter Sniffing" but I am not sure if that applies to my case since I am only using a TSQL query and not a SP.
    Any feedback would be appreciated.
    PS: My query looks like below:
    Select Col1, Count(*)
    From Tbl1
    Where Col2 = @Para1
    Group By Col1
    KK

    Hi Kk,
    Is your data retrieval takes time or report rendering takes time? Run this query in your report server database to get the above two. Select * From Executionlog2
    Check the timings data retrieval time, processing time, and report rendering time.
    If data retrieval takes time,
    Give some default values to filters (parameters).
    If parameter rendering takes time
    Choose different options for parameter selection. Instead of multiselction of parameter, use like etc.
    Let me know which causing this problem after running the SQL profiler or executionlog query so that I can help you more. Or you can use SQL profiler to check what query takes more time.
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Query Fast In SQLPlus and Toad but Slow Otherwise

    Environment is Oracle 10g on AIX with 10g drivers on Windows XP as the client. Several queries run in less than 9 seconds in Toad and SQLPlus but take hours or never return in Business Objects Deski, MS Access, and SQL Server SSIS. The exact same SQL produces completely different explain plans based on if it is run from Toad/SQLPlus vs the other products I mentioned. All the software is on the same XP machine and does not use middleware. 99 percent of our queries will run fast or slow in all products. What is it that Toad and/or SQLPlus does to run the queries fast? Why does Oracle change explain plans based on what application connects to it? The goal is to run Business Objects reports from Oracle. Any help or direction for further troubleshooting would be appreciated. Thank-you.

    Charles, on the XP machine I selected the Admin option when installing the client. The software should be 10g R2. Below is the information requested. If you need more please let me know. Also, I am asking our DBA to check the bitmap issue.
    I appreciate the help. Thank-you for taking your time...
    BAD Settings
    SQL_ID                CN NAME                                     VALUE                     DEF
    64yzv2570s56x          0 _pga_max_size                            209700 KB                 NO
    64yzv2570s56x          0 active_instance_count                    1                         YES
    64yzv2570s56x          0 bitmap_merge_area_size                   1048576                   YES
    64yzv2570s56x          0 cpu_count                                4                         YES
    64yzv2570s56x          0 cursor_sharing                           similar                   NO
    64yzv2570s56x          0 hash_area_size                           131072                    YES
    64yzv2570s56x          0 optimizer_dynamic_samplin                2                         YES
    64yzv2570s56x          0 optimizer_features_enable                10.2.0.4                  YES
    64yzv2570s56x          0 optimizer_index_caching                  0                         YES
    64yzv2570s56x          0 optimizer_index_cost_adj                 100                       YES
    64yzv2570s56x          0 optimizer_mode                           choose                    NO
    64yzv2570s56x          0 optimizer_secure_view_mer                true                      YES
    64yzv2570s56x          0 parallel_ddl_mode                        enabled                   YES
    64yzv2570s56x          0 parallel_dml_mode                        disabled                  YES
    64yzv2570s56x          0 parallel_execution_enable                true                      YES
    64yzv2570s56x          0 parallel_query_mode                      enabled                   YES
    64yzv2570s56x          0 parallel_threads_per_cpu                 2                         YES
    64yzv2570s56x          0 pga_aggregate_target                     1048576 KB                YES
    64yzv2570s56x          0 query_rewrite_enabled                    true                      YES
    64yzv2570s56x          0 query_rewrite_integrity                  trusted                   NO
    64yzv2570s56x          0 skip_unusable_indexes                    true                      YES
    64yzv2570s56x          0 sort_area_retained_size                  0                         YES
    64yzv2570s56x          0 sort_area_size                           65536                     YES
    64yzv2570s56x          0 star_transformation_enabl                temp_disable              NO
    64yzv2570s56x          0 statistics_level                         typical                   YES
    64yzv2570s56x          0 workarea_size_policy                     auto                      YES
    GOOD Settings
    SQL_ID                CN NAME                                     VALUE                     DEF
    7y2m07bk7qwgx          0 _pga_max_size                            209700 KB                 NO
    7y2m07bk7qwgx          0 active_instance_count                    1                         YES
    7y2m07bk7qwgx          0 bitmap_merge_area_size                   1048576                   YES
    7y2m07bk7qwgx          0 cpu_count                                4                         YES
    7y2m07bk7qwgx          0 cursor_sharing                           similar                   NO
    7y2m07bk7qwgx          0 hash_area_size                           131072                    YES
    7y2m07bk7qwgx          0 optimizer_dynamic_samplin                2                         YES
    7y2m07bk7qwgx          0 optimizer_features_enable                10.2.0.4                  YES
    7y2m07bk7qwgx          0 optimizer_index_caching                  0                         YES
    7y2m07bk7qwgx          0 optimizer_index_cost_adj                 100                       YES
    7y2m07bk7qwgx          0 optimizer_mode                           choose                    NO
    7y2m07bk7qwgx          0 optimizer_secure_view_mer                true                      YES
    7y2m07bk7qwgx          0 parallel_ddl_mode                        enabled                   YES
    7y2m07bk7qwgx          0 parallel_dml_mode                        disabled                  YES
    7y2m07bk7qwgx          0 parallel_execution_enable                true                      YES
    7y2m07bk7qwgx          0 parallel_query_mode                      enabled                   YES
    7y2m07bk7qwgx          0 parallel_threads_per_cpu                 2                         YES
    7y2m07bk7qwgx          0 pga_aggregate_target                     1048576 KB                YES
    7y2m07bk7qwgx          0 query_rewrite_enabled                    true                      YES
    7y2m07bk7qwgx          0 query_rewrite_integrity                  trusted                   NO
    7y2m07bk7qwgx          0 skip_unusable_indexes                    true                      YES
    7y2m07bk7qwgx          0 sort_area_retained_size                  0                         YES
    7y2m07bk7qwgx          0 sort_area_size                           65536                     YES
    7y2m07bk7qwgx          0 star_transformation_enabl                temp_disable              NO
    7y2m07bk7qwgx          0 statistics_level                         typical                   YES
    7y2m07bk7qwgx          0 workarea_size_policy                     auto                      YES
    BAD Plan
    PLAN_TABLE_OUTPUT                                                                                                                                    
    SQL_ID  64yzv2570s56x, child number 0                                                                                                                
    SELECT  --q2   DM_FAC.FAC_NM,     COUNT(DISTINCT DM_ACCT.ACCT_SK),     DM_DRG_SVC_LN.DRG_SVC_LN_DESC                                                 
    FROM     DM_FAC,     DM_ACCT,     DM_DRG_SVC_LN,     DM_ORG_UNIT_GRP,     DM_ORG_UNIT_DIV,                                                           
    DM_DT_QRY DM_DT__DSCH,     DM_BILL_LOC,     DM_DT_QRY DM_DT_VISITSVC,                                                                            
    FACT_VISIT,     DM_RSP_PTY    WHERE     (                                                                                          
    DM_ORG_UNIT_GRP.ORG_UNIT_GRP_SK=DM_ORG_UNIT_DIV.ORG_UNIT_GRP_SK )     AND ( DM_ORG_UNIT_GRP.ARCHIVE_IND                                              
    = :"SYS_B_00" )     AND ( DM_DT_VISITSVC.DT2_SK=FACT_VISIT.SVC_DT2_SK )     AND (                                                  
    DM_BILL_LOC.BILL_LOC_SK=FACT_VISIT.BILL_LOC_SK )     AND (                                                                         
    DM_ORG_UNIT_DIV.ORG_UNIT_DIV_SK=FACT_VISIT.ORG_UNIT_DIV_SK )     AND (                                                             
    FACT_VISIT.DEL_IND=:"SYS_B_01" )     AND ( DM_RSP_PTY.ACCT_SK=DM_ACCT.ACCT_SK )                                                    
    AND ( DM_RSP_PTY.RSP_PTY_TYPE_CD=:"SYS_B_02" )     AND ( DM_ACCT.FAC_CD=DM_FAC.FAC_CD )     AND (                                                    
    DM_ACCT.DSCH_DT=DM_DT__DSCH.DT )     AND ( DM_ACCT.DRG_SVC_LN_SK=DM_DRG_SVC_LN.DRG_SVC_LN                                                        
    Plan hash value: 2053235935                                                                                                                          
    | Id  | Operation                             | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |                                     
    |   0 | SELECT STATEMENT                      |                        |       |       |  7559 (100)|          |                                     
    |   1 |  SORT GROUP BY                        |                        |     1 |   174 |  7559   (2)| 00:00:20 |                                     
    |*  2 |   FILTER                              |                        |       |       |            |          |                                     
    |   3 |    NESTED LOOPS                       |                        |     1 |   174 |  7558   (2)| 00:00:20 |                                     
    |   4 |     NESTED LOOPS                      |                        |     1 |   149 |  7557   (2)| 00:00:20 |                                     
    |*  5 |      HASH JOIN                        |                        |     1 |   128 |  7556   (2)| 00:00:20 |                                     
    |   6 |       NESTED LOOPS                    |                        |     6 |   678 |  7543   (2)| 00:00:20 |                                     
    |   7 |        NESTED LOOPS                   |                        |   170 | 15300 |  7201   (2)| 00:00:19 |                                     
    |*  8 |         HASH JOIN                     |                        |    41 |  3239 |  5141   (2)| 00:00:14 |                                     
    |*  9 |          HASH JOIN                    |                        |    75 |  4725 |  5137   (2)| 00:00:14 |                                     
    |* 10 |           TABLE ACCESS FULL           | DM_ORG_UNIT_DIV        |   170 |  2550 |     5   (0)| 00:00:01 |                                     
    |* 11 |           HASH JOIN                   |                        |   204 |  9792 |  5131   (2)| 00:00:14 |                                     
    |* 12 |            TABLE ACCESS FULL          | DM_DT_QRY              |     7 |    98 |    13  (16)| 00:00:01 |                                     
    |* 13 |            TABLE ACCESS BY INDEX ROWID| FACT_VISIT    | 17647 |   448K|  3893   (2)| 00:00:11 |                                     
    |  14 |             NESTED LOOPS              |                        | 35294 |  1171K|  5116   (2)| 00:00:14 |                                     
    |* 15 |              TABLE ACCESS FULL        | DM_BILL_LOC            |     2 |    16 |     3   (0)| 00:00:01 |                                     
    |* 16 |              INDEX RANGE SCAN         | FV_DMBILLLOC_FK | 35294 |       |   105   (4)| 00:00:01 |                                     
    |* 17 |          TABLE ACCESS FULL            | DM_ORG_UNIT_GRP        |    57 |   912 |     3   (0)| 00:00:01 |                                     
    |* 18 |         TABLE ACCESS BY INDEX ROWID   | DM_RSP_PTY             |     4 |    44 |    50   (0)| 00:00:01 |                                     
    |* 19 |          INDEX RANGE SCAN             | XSI_DMRSPPY_CNRPERSID  |    48 |       |     2   (0)| 00:00:01 |                                     
    |* 20 |        TABLE ACCESS BY INDEX ROWID    | DM_ACCT                |     1 |    23 |     2   (0)| 00:00:01 |                                     
    |* 21 |         INDEX UNIQUE SCAN             | DM_ACCT_PK             |     1 |       |     1   (0)| 00:00:01 |                                     
    |* 22 |       TABLE ACCESS FULL               | DM_DT_QRY              |    30 |   450 |    12   (9)| 00:00:01 |                                     
    |  23 |      TABLE ACCESS BY INDEX ROWID      | DM_FAC                 |     1 |    21 |     1   (0)| 00:00:01 |                                     
    |* 24 |       INDEX UNIQUE SCAN               | DM_FAC_UK              |     1 |       |     0   (0)|          |                                     
    |  25 |     TABLE ACCESS BY INDEX ROWID       | DM_DRG_SVC_LN          |     1 |    25 |     1   (0)| 00:00:01 |                                     
    |* 26 |      INDEX UNIQUE SCAN                | DM_DRG_SVC_LN_PK       |     1 |       |     0   (0)|          |                                     
    Predicate Information (identified by operation id):                                                                                                  
       2 - filter((TO_DATE(:SYS_B_16,:SYS_B_17)<=TO_DATE(:SYS_B_18,:SYS_B_19) AND :SYS_B_00=:SYS_B_07))                                                  
       5 - access("DM_ACCT"."DSCH_DT"="DM_DT__DSCH"."DT")                                                                                            
       8 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_GRP_SK"="DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_SK")                                                               
       9 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_DIV_SK"="FACT_VISIT"."ORG_UNIT_DIV_SK")                                                           
      10 - filter(("DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_08 OR                                                                                       
                  "DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_09))                                                                                         
      11 - access("DM_DT_VISITSVC"."DT2_SK"="FACT_VISIT"."SVC_DT2_SK")                                                                          
      12 - filter(("DM_DT_VISITSVC"."DT">=TO_DATE(:SYS_B_16,:SYS_B_17) AND                                                                               
                  "DM_DT_VISITSVC"."DT"<=TO_DATE(:SYS_B_18,:SYS_B_19)))                                                                                  
      13 - filter("FACT_VISIT"."DEL_IND"=:SYS_B_01)                                                                                             
      15 - filter(("DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_14 OR "DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_15))                                                    
      16 - access("FACT_VISIT"."BILL_LOC_SK"="DM_BILL_LOC"."BILL_LOC_SK")                                                                       
      17 - filter(("DM_ORG_UNIT_GRP"."ARCHIVE_IND"=:SYS_B_00 AND                                                                                         
                  INTERNAL_FUNCTION("DM_ORG_UNIT_GRP"."EIS_LVL_1") AND                                                                                   
                  TO_NUMBER("DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_NBR")<>:SYS_B_13))                                                                           
      18 - filter("DM_RSP_PTY"."RSP_PTY_TYPE_CD"=:SYS_B_02)                                                                                              
      19 - access("DM_RSP_PTY"."CNR_PERS_ID_CURR"="FACT_VISIT"."CNR_PERS_ID_CURR")                                                              
           filter("DM_RSP_PTY"."CNR_PERS_ID_CURR" IS NOT NULL)                                                                                           
      20 - filter("DM_ACCT"."CURR_PAT_TYPE_CD"=:SYS_B_10)                                                                                                
      21 - access("DM_RSP_PTY"."ACCT_SK"="DM_ACCT"."ACCT_SK")                                                                                            
      22 - filter(("DM_DT__DSCH"."MTH_NBR"=:SYS_B_12 AND "DM_DT__DSCH"."YR_NBR"=:SYS_B_11))                                                      
      24 - access("DM_ACCT"."FAC_CD"="DM_FAC"."FAC_CD")                                                                                                  
      26 - access("DM_ACCT"."DRG_SVC_LN_SK"="DM_DRG_SVC_LN"."DRG_SVC_LN_SK")                                                                             
    GOOD Plan
    PLAN_TABLE_OUTPUT                                                                                                                                    
    SQL_ID  7y2m07bk7qwgx, child number 0                                                                                                                
    SELECT --q1   DM_FAC.FAC_NM,    COUNT(DISTINCT DM_ACCT.ACCT_SK),    DM_DRG_SVC_LN.DRG_SVC_LN_DESC  FROM                                              
    DM_FAC,    DM_ACCT,    DM_DRG_SVC_LN,    DM_ORG_UNIT_GRP,    DM_ORG_UNIT_DIV,    DM_DT_QRY  DM_DT__DSCH,                                         
    DM_BILL_LOC,    DM_DT_QRY  DM_DT_VISITSVC,    FACT_VISIT,    DM_RSP_PTY  WHERE    (                                                
    DM_ORG_UNIT_GRP.ORG_UNIT_GRP_SK=DM_ORG_UNIT_DIV.ORG_UNIT_GRP_SK  )    AND  ( DM_ORG_UNIT_GRP.ARCHIVE_IND =                                           
    :"SYS_B_00"  )    AND  ( DM_DT_VISITSVC.DT2_SK=FACT_VISIT.SVC_DT2_SK  )    AND  (                                                  
    DM_BILL_LOC.BILL_LOC_SK=FACT_VISIT.BILL_LOC_SK  )    AND  (                                                                        
    DM_ORG_UNIT_DIV.ORG_UNIT_DIV_SK=FACT_VISIT.ORG_UNIT_DIV_SK  )    AND  (                                                            
    FACT_VISIT.DEL_IND=:"SYS_B_01"  )    AND  ( DM_RSP_PTY.ACCT_SK=DM_ACCT.ACCT_SK  )    AND  (                                        
    DM_RSP_PTY.RSP_PTY_TYPE_CD=:"SYS_B_02"  )    AND  ( DM_ACCT.FAC_CD=DM_FAC.FAC_CD  )    AND  (                                                        
    DM_ACCT.DSCH_DT=DM_DT__DSCH.DT  )    AND  ( DM_ACCT.DRG_SVC_LN_SK=DM_DRG_SVC_LN.DRG_SVC_LN_SK  )                                                 
    Plan hash value: 1376284724                                                                                                                          
    | Id  | Operation                                    | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |                           
    |   0 | SELECT STATEMENT                             |                           |       |       | 22053 (100)|          |                           
    |   1 |  SORT GROUP BY                               |                           |     2 |   348 | 22053   (3)| 00:00:57 |                           
    |*  2 |   FILTER                                     |                           |       |       |            |          |                           
    |   3 |    NESTED LOOPS                              |                           |     2 |   348 | 22052   (3)| 00:00:57 |                           
    |   4 |     NESTED LOOPS                             |                           |     2 |   306 | 22050   (3)| 00:00:57 |                           
    |   5 |      NESTED LOOPS                            |                           |     2 |   256 | 22048   (3)| 00:00:57 |                           
    |*  6 |       HASH JOIN                              |                           |     4 |   456 | 22044   (3)| 00:00:57 |                           
    |*  7 |        HASH JOIN                             |                           |     8 |   784 | 22041   (3)| 00:00:57 |                           
    |*  8 |         HASH JOIN                            |                           |    21 |  1743 | 22035   (3)| 00:00:57 |                           
    |*  9 |          TABLE ACCESS FULL                   | DM_BILL_LOC               |     2 |    16 |     3   (0)| 00:00:01 |                           
    |* 10 |          TABLE ACCESS BY INDEX ROWID         | FACT_VISIT       |     5 |   130 |    12   (0)| 00:00:01 |                           
    |  11 |           NESTED LOOPS                       |                           |  3453 |   252K| 22031   (3)| 00:00:57 |                           
    |  12 |            NESTED LOOPS                      |                           |   661 | 32389 | 15399   (4)| 00:00:40 |                           
    |  13 |             NESTED LOOPS                     |                           |   585 | 22230 | 13079   (5)| 00:00:34 |                           
    |* 14 |              TABLE ACCESS FULL               | DM_DT_QRY                 |    30 |   450 |    12   (9)| 00:00:01 |                           
    |  15 |              TABLE ACCESS BY INDEX ROWID     | DM_ACCT                   |    19 |   437 | 13079   (5)| 00:00:34 |                           
    |  16 |               BITMAP CONVERSION TO ROWIDS    |                           |       |       |            |          |                           
    |  17 |                BITMAP AND                    |                           |       |       |            |          |                           
    |  18 |                 BITMAP CONVERSION FROM ROWIDS|                           |       |       |            |          |                           
    |* 19 |                  INDEX RANGE SCAN            | DMACCT_DSCH_DT            |  2098 |       |     7   (0)| 00:00:01 |                           
    |  20 |                 BITMAP CONVERSION FROM ROWIDS|                           |       |       |            |          |                           
    |* 21 |                  INDEX RANGE SCAN            | XSI_DMACCT01_CURRPATTYPCD |  2098 |       |   421   (5)| 00:00:02 |                           
    |* 22 |             TABLE ACCESS BY INDEX ROWID      | DM_RSP_PTY                |     1 |    11 |     4   (0)| 00:00:01 |                           
    |* 23 |              INDEX RANGE SCAN                | XSI_DMRSPPTY_PERS         |     1 |       |     3   (0)| 00:00:01 |                           
    |* 24 |            INDEX RANGE SCAN                  | FV_CNRPERSON_FK    |    13 |       |     2   (0)| 00:00:01 |                           
    |* 25 |         TABLE ACCESS FULL                    | DM_ORG_UNIT_DIV           |   170 |  2550 |     5   (0)| 00:00:01 |                           
    |* 26 |        TABLE ACCESS FULL                     | DM_ORG_UNIT_GRP           |    57 |   912 |     3   (0)| 00:00:01 |                           
    |* 27 |       TABLE ACCESS BY INDEX ROWID            | DM_DT_QRY                 |     1 |    14 |     1   (0)| 00:00:01 |                           
    |* 28 |        INDEX UNIQUE SCAN                     | DM_DT2_QRY_UK             |     1 |       |     0   (0)|          |                           
    |  29 |      TABLE ACCESS BY INDEX ROWID             | DM_DRG_SVC_LN             |     1 |    25 |     1   (0)| 00:00:01 |                           
    |* 30 |       INDEX UNIQUE SCAN                      | DM_DRG_SVC_LN_PK          |     1 |       |     0   (0)|          |                           
    |  31 |     TABLE ACCESS BY INDEX ROWID              | DM_FAC                    |     1 |    21 |     1   (0)| 00:00:01 |                           
    |* 32 |      INDEX UNIQUE SCAN                       | DM_FAC_UK                 |     1 |       |     0   (0)|          |                           
    Predicate Information (identified by operation id):                                                                                                  
       2 - filter((TO_DATE(:SYS_B_16,:SYS_B_17)<=TO_DATE(:SYS_B_18,:SYS_B_19) AND :SYS_B_00=:SYS_B_07))                                                  
       6 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_GRP_SK"="DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_SK")                                                               
       7 - access("DM_ORG_UNIT_DIV"."ORG_UNIT_DIV_SK"="FACT_VISIT"."ORG_UNIT_DIV_SK")                                                           
       8 - access("FACT_VISIT"."BILL_LOC_SK"="DM_BILL_LOC"."BILL_LOC_SK")                                                                       
       9 - filter(("DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_14 OR "DM_BILL_LOC"."BILL_LOC_NBR"=:SYS_B_15))                                                    
      10 - filter("FACT_VISIT"."DEL_IND"=:SYS_B_01)                                                                                             
      14 - filter(("DM_DT__DSCH"."MTH_NBR"=:SYS_B_12 AND "DM_DT__DSCH"."YR_NBR"=:SYS_B_11))                                                      
      19 - access("DM_ACCT"."DSCH_DT"="DM_DT__DSCH"."DT")                                                                                            
      21 - access("DM_ACCT"."CURR_PAT_TYPE_CD"=:SYS_B_10)                                                                                                
      22 - filter("DM_RSP_PTY"."CNR_PERS_ID_CURR" IS NOT NULL)                                                                                           
      23 - access("DM_RSP_PTY"."ACCT_SK"="DM_ACCT"."ACCT_SK" AND "DM_RSP_PTY"."RSP_PTY_TYPE_CD"=:SYS_B_02)                                               
      24 - access("DM_RSP_PTY"."CNR_PERS_ID_CURR"="FACT_VISIT"."CNR_PERS_ID_CURR")                                                              
      25 - filter(("DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_08 OR "DM_ORG_UNIT_DIV"."DIV_CAT01_DESC"=:SYS_B_09))                                        
      26 - filter(("DM_ORG_UNIT_GRP"."ARCHIVE_IND"=:SYS_B_00 AND INTERNAL_FUNCTION("DM_ORG_UNIT_GRP"."EIS_LVL_1") AND                                    
                  TO_NUMBER("DM_ORG_UNIT_GRP"."ORG_UNIT_GRP_NBR")<>:SYS_B_13))                                                                           
      27 - filter(("DM_DT_VISITSVC"."DT">=TO_DATE(:SYS_B_16,:SYS_B_17) AND                                                                               
                  "DM_DT_VISITSVC"."DT"<=TO_DATE(:SYS_B_18,:SYS_B_19)))                                                                                  
      28 - access("DM_DT_VISITSVC"."DT2_SK"="FACT_VISIT"."SVC_DT2_SK")                                                                          
      30 - access("DM_ACCT"."DRG_SVC_LN_SK"="DM_DRG_SVC_LN"."DRG_SVC_LN_SK")                                                                             
      32 - access("DM_ACCT"."FAC_CD"="DM_FAC"."FAC_CD")                                                                                                  
       

Maybe you are looking for