MY QUERY IS TAKING TIME WHILE EXECUTING IN WAD

HI BW GURUS
If i execute the report(using query with variables) which contains 8,50,000 records in WAD then its taking more than 900 seconds and say Connection timed out at the end.
If i execute the same query in Query designer using Web browser then it will take 400 seconds to show all the data in hierarchy or tabular view.
I've done tuning using RSRT on query read mode and persistent mode etc..
Can you please help me?

Execution plan depends on many factors, statistics status of the objects, system statistics if you are using, init.ora parameters like mulitblock_read_count, parallellism, etc.
If you want to use same execution plan for all database, you should refer stored_outline. In 10g you can try sql profiling.
Ashok

Similar Messages

  • Using Materilaized view in a query .. query is taking time????

    Hi I have a query :-
    SELECT rownum as id, u.last_name, u.first_name,u.phone phone, u.empid,u.supervisor id
    FROM emp_view u -- using view
    CONNECT BY PRIOR u.empid = u.supervisor_id
    START WITH u.sbcuid = 'ph2755';
    here emp_view is a view .
    ------ The above query is taking 3 sec to execute.
    Then I created Materialuized view emp_mv and the the MV query is same as emp_view view query.
    After this i executed following sql
    SELECT rownum as id, u.last_name, u.first_name,u.phone phone, u.empid,u.supervisor id
    FROM emp_mv u -- using materialized view
    CONNECT BY PRIOR u.empid = u.supervisor_id
    START WITH u.sbcuid = 'ph2755';
    this query is taking 15 sec to execute..... :(
    can anyone please tell me why MV query is taking time????

    Hi,
    In your first case you query a view, meaning that you query the underlying tables. These probably have indexes and stats are updated.
    In you second case you query a materialized view, meaning that you query the underlying base table of that mview.
    This probably do not have the same indexes to support that query.
    But of course, I'm just guessing based on the little information provided.
    If you want to take this further, please search for "When your query takes too long" and "How to post a tuning request".
    These two threads holds valuable information, not only on how to ask this kind of question, but also how to start solving it on your own.
    Regards
    Peter

  • How to know which sql query is taking time for concurrent program

       Hi sir,
    I am running concurrent program,that is taking time to execute ,i want to know which sql query causing performance
    Thanaks,
    Sreekanth

    Hi,
    My Learning: Diagnosing Oracle Applications Concurrent Programmes - 11i/R12
    How to run a Trace for a Concurrent Program? (Doc ID 415640.1)
    FAQ: Common Tracing Techniques in Oracle E-Business Applications 11i and R12 (Doc ID 296559.1)
    How To Get Level 12 Trace And FND Debug File For Concurrent Programs (Doc ID 726039.1)
    How To Trace a Concurrent Request And Generate TKPROF File (Doc ID 453527.1)
    Regards
    Yoonas

  • Query taking time to execute

    Hello,
    i have created one query based on inventory cube 0IC_C03. when i am executing the infocube based on a particular date i am able to see the output but when i am executing the query on the basis of that particular date given while executing the cube the query is taking long time to execute and throwing a message of time limit exceed.
    could anyone suggest me why the query is showing such nessage along with resolution.
    Thanks,
    Kumkum
    Edited by: kumkum basu on Nov 29, 2010 2:33 PM

    Hi,
    There can be number of reason.
    What you can do is:-
    put the unwanted characteristics in Free Characteristics
    Remove unwanted cell reference
    Try using partitions in cubes
    Use aggregates for summarised data.
    f the above options doesnt work, then try pre-caching.This will definitely help!
    Use proper selections to get small subset of data.
    Goto RSRT>> type your query name>> Query properties>> select cache mode=4
    In addition to RSRT, ST05 (sql trace), SE30 (runtime analysis) and system statistics (ST03) may help you in identifying performance issues with a report.
    Thanks,.
    Saveen Kumar

  • Query take more time to execute

    Hi
    I am using in sql select statement two non exist statements it is taken more time to execute the query ,non exist is any impact query performance
    thank's

    [email protected] wrote:
    I am using in sql select statement two non exist statements it is taken more time to execute the query ,non exist is any impact query performanceI have a query that is using even more time to execute. Do I win?

  • Query takes large time to execute

    Hi,
    These are interview questions:
    1. If the query takes lot of time to execute, what should be the preliminary analysis done by a DBA
    2. If we have system, users, rollback and temporary tablespaces, 2 disks disk1 and disk2, how should the tablespaces be distributed on the disks
    I am interested to know the answers. Kindly respond
    Thanks and Regards
    Sumit Sharma

    2. If we have system, users, rollback and temporary tablespaces, 2 disks disk1 and disk2, how should the tablespaces be distributed on the disks
    2 disk are not enough for a good distribution but however you could the best possible with that.
    Really the optimal distribution of disk must be so:
    DISK1: Tablespaces of data, One Controlfile, Redo Logs ( 1 member per group )
    DISK2: Redo Logs ( 1 member per group ), One Controlfile
    DISK3: Tablespaces for Indexes, Redo Logs ( 1 member per group ), One Controlfile
    DISK4: Archives, Rollback Segments
    Joel Pérez
    http://otn.oracle.com/experts

  • What is the reason for query take more time to execute

    Hi,
    What is the reason for the query take more time inside procedure.
    but if i execute that query alone then it excute within a minutes.
    query includes update and insert.

    I have a insert and update query when I execute
    without Procedure then that query execute faster but
    If I execute inside procedure then It takes 2 hours
    to execute.Put you watch 2 hours back and the problem will disappear.
    do you understand what I want to say?I understood what you wanted to say and I understood you didn't understood what I said.
    What does the procedure, what does the query, how can you say the query does the same as the procedure that takes longer. You didn't say anything useful to have an idea of what you're talking about.
    Everyone knows what means that something is slower than something else, but it means nothing if you don't say what you're talking about.
    To begin with something take a look at this
    When your query takes too long ...
    especially the part regarding the trace.
    Bye Alessandro

  • Query ake Long Time to execute.

    Hi All,
    I Have query that joins on 4 tables.
    The Query takes 12 minutes to execute.
    the sga size is 50m.
    Please tell me whats to do now.
    Thanks in advance.
    Prathamesh.

    Prathamesh,
    Please go thru Performance Tuning Guide to isolate your problem:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/toc.htm
    Try to find out:
    Is it a new query or earlier it used to return result quickly?
    Check Explain Plan etc to find out what exactly is going on behind the query.
    If SGA is not properly tuned then it will effect all query, it'll not be isolated on single one.
    Regards,
    Sayan

  • Cost center query tkakes a long time while executing with User's Id

    Hi Experts,
    We have a cost-center query which is taking a long time to display the output with User's id.
    I tried running the report with the same selections and was able to get the values within seconds.
    Also we have maintained aggregates on the cube.
    When user tries it for a single cost-center the performance is Ok.
    Any help on this wil be highly appreciated.
    Thanks,
    Amit

    Hi,
    while running the query find the trace in ST05 - before running the query in RSRT activate the trace with user id and after seeing the report in RSRT deactivate the trace.
    go through the logs find the which object taking long time then create the aggregates on the cube.
    while creating agggates give the fixed value.
    please find the doc " how to find the SQL traces in sap bi"
    Thanks,
    Phani.

  • Report is taking time to execute the following query

    Hi All,
    I have one query using in reports6i,which i am describing down,its taking half an hour to execute.
    I need to tune the query,if any one could help or any suggestions...........highly appreciable.
    SELECT +ALL_ROWS
    DISTINCT sm.orgn_code,
    sm.sample_no,
    -- DECODE (sm.batch_id, NULL, 'Item/Locn', 'Production') AS sample_type,
    NVL2(sm.batch_id, 'Production', 'Item/Locn') AS sample_type,
    sm.date_drawn,
    su.user_name AS drawn_by,
    im.item_no,
    lm.lot_no,
    im.inv_type,
    qt.test_code,
    rm.user_name AS result_by,
    rm.result_date,
    qt.test_type,
    qv.min_value_num,
    qv.max_value_num,
    DECODE(qt.test_type, 'N', TO_CHAR(qv.min_value_num) || ' - ' || TO_CHAR(qv.max_value_num), NULL) AS the_range,
    DECODE(qt.test_type, 'N', TO_CHAR(qv.target_value_num), qv.target_value_char) AS the_spec,
    DECODE(qt.test_type, 'N', TO_CHAR(rm.result_value_num), rm.result_value_char) AS the_result,
    DECODE(qt.test_unit, 'N/A', NULL, qt.test_unit) AS qc_uom,
    DECODE(sm.sample_disposition,
    '0RT',
    'RETAIN',
    '1P',
    'PENDING',
    '2I',
    'IN PROGRESS',
    '3C',
    'COMPLETE',
    '4A',
    'ACCEPT',
    '5AV',
    'ACCEPT WITH VARIANCE',
    '6RJ',
    'REJECT',
    '7CN',
    'CANCEL',
    NULL) AS disposition
    FROM gmd.gmd_samples sm,
    -- gmd.gmd_results rm,
    gmd.gmd_qc_tests_b qt,
    gmd.gmd_specifications_b sp,
    gmd.gmd_spec_tests_b qv,
    gmi.ic_lots_mst lm,
    apps.ic_item_mst im,
    applsys.fnd_user su,
    (SELECT gr.result_date,
    gr.sample_id,
    gr.test_id,
    gr.result_value_num,
    gr.result_value_char,
    ru.user_name
    FROM gmd_results gr,
    applsys.fnd_user ru
    WHERE (to_date(to_char(gr.result_date,'mm/dd/yyyy'),'mm/dd/yyyy') BETWEEN
    to_date(to_char(:p_2_start_date,'mm/dd/yyyy'),'mm/dd/yyyy') AND
    to_date(to_char(:p_3_end_date,'mm/dd/yyyy'),'mm/dd/yyyy'))
    AND gr.result_date IS NOT NULL
    AND ru.user_id = gr.last_updated_by) rm
    WHERE 1 = 1 --rm.result_date IS NOT NULL
    -- AND TO_DATE (TO_CHAR (rm.result_date, 'mm/dd/yyyy'), 'mm/dd/yyyy') >=TO_DATE (TO_CHAR (:p_2_start_date, 'mm/dd/yyyy'), 'mm/dd/yyyy')
    -- AND TO_DATE (TO_CHAR (rm.result_date, 'mm/dd/yyyy'), 'mm/dd/yyyy') <=TO_DATE (TO_CHAR (:p_3_end_date, 'mm/dd/yyyy'), 'mm/dd/yyyy')
    AND im.inv_type = NVL (UPPER (:p_inv_type), im.inv_type)
    AND sm.orgn_code = UPPER (:p_1_orgn)
    AND sm.item_id = lm.item_id --double
    AND sm.lot_id = lm.lot_id
    AND sm.item_id = lm.item_id --double
    AND sm.item_id = im.item_id
    AND sp.item_id = im.item_id
    AND rm.sample_id = sm.sample_id
    AND su.user_id = sm.sampler_id
    -- AND ru.user_id = rm.last_updated_by
    AND rm.test_id = qt.test_id
    AND qt.test_id = qv.test_id
    AND qv.spec_id = sp.spec_id
    AND sp.spec_status = 700
    AND qt.test_code LIKE NVL(:p_test, '%')
    AND ( ( qt.test_type = 'N'
    AND ( rm.result_value_num < qv.min_value_num
    OR rm.result_value_num > qv.max_value_num))
    OR ( qt.test_type <> 'N'
    AND rm.result_value_char <> 'OK'
    AND rm.result_value_char <> qv.target_value_char)
    Thanks in Advance

    You may want to consider demoralization views/tables or create indexes etc. to improve performance. Post it to
    PL/SQL
    to get more and quicker responses.

  • Urgent Need: Query is taking time

    Hi,
    I have a query which is taking lots of time.Please help me in this regard...
    select subscripti0_.RENTAL_ID as RENTAL1_101_0_, movieprodu1_.product_id as product1_45_1_, moviepacka2_.PACKAGE_ID as PACKAGE1_47_2_, movietitle3_.TITLE_ID as TITLE1_48_3_, subscripti0_.LOGICAL_QUEUE_POSITION as LOGICAL2_101_0_, subscripti0_.STATUS as STATUS101_0_, subscripti0_.RENT_CODE as RENT4_101_0_, subscripti0_.IS_VISIBLE_FLAG as IS5_101_0_, subscripti0_.SHIP_DATE as SHIP6_101_0_, subscripti0_.DATE_CHECK_IN as DATE7_101_0_, subscripti0_.SET_NBR as SET8_101_0_, subscripti0_.ALLOCATION_DATE as ALLOCATION9_101_0_, subscripti0_.USPS_SHIP_DATE as USPS10_101_0_, subscripti0_.CENTRAL_CHECKIN_DATE as CENTRAL11_101_0_, subscripti0_.ESTIMATED_ARRIVAL_DATE as ESTIMATED12_101_0_, subscripti0_.CREATED_BY as CREATED13_101_0_, subscripti0_.CREATED_DATE as CREATED14_101_0_, subscripti0_.UPDATED_BY as UPDATED15_101_0_, subscripti0_.UPDATED_DATE as UPDATED16_101_0_, subscripti0_.SUBSCRIPTION_ID as SUBSCRI17_101_0_, subscripti0_.MOVIE_ID as MOVIE18_101_0_, movieprodu1_.ONLINE_RELEASE_DATE as ONLINE2_45_1_, movieprodu1_.PRODUCT_TITLE as PRODUCT3_45_1_, movieprodu1_.PACKAGE_ID as PACKAGE4_45_1_, movieprodu1_1_.AVAILABILITY_BAND as AVAILABI2_46_1_, movieprodu1_1_.TOTAL_RENTABLE_INVENTORY as TOTAL3_46_1_, NVL(movieprodu1_.ONLINE_FLAG, 0) as formula0_1_, NVL(movieprodu1_.PRIMARY_PRODUCT, 0) as formula1_1_, moviepacka2_.TITLE as TITLE47_2_, moviepacka2_.dvd_release_date as dvd3_47_2_, moviepacka2_.FORMAT as FORMAT47_2_, moviepacka2_.PACKAGE_MPAA as PACKAGE5_47_ 2_, moviepacka2_.T_ARTICLE as T6_47_2_, moviepacka2_.TITLE_ID as TITLE7_47_2_, movietitle3_.TITLE as TITLE48_3_, movietitle3_.THEATRICAL_RELEASE as THEATRICAL3_48_3_, movietitle3_.TITLE_MPAA as TITLE4_48_3_, movietitle3_.LEGACY_ID as LEGACY5_48_3_, movietitle3_.AVERAGE_USER_RATING as AVERAGE6_48_3_, movietitle3_.RUNNING_TIME as RUNNING7_48_3_, movietitle3_.PRIMARY_PACKAGE_ID as PRIMARY8_48_3_, movietitle3_1_.BUY_NEW as BUY2_49_3_, movietitle3_1_.BUY_USED as BUY3_49_3_, movietitle3_1_.RENT_DOWNLOAD as RENT4_49_3_, movietitle3_1_.BUY_DOWNLOAD as BUY5_49_3_, NVL(movietitle3_.HAS_RENTABLE_PRODUCTS, 0) as formula3_3_ from SUBSCRIPTION_RENTAL subscripti0_ inner join ACTIVE_MOVIE_PRODUCT movieprodu1_ on subscripti0_.MOVIE_ID=movieprodu1_.product_id left outer join PRODUCT_AVAILABILITY movieprodu1_1_ on movieprodu1_.product_id=movieprodu1_1_.MOVIE_ID inner join ACTIVE_MOVIE_PACKAGE moviepacka2_ on movieprodu1_.PACKAGE_ID=moviepacka2_.PACKAGE_ID inner join ACTIVE_MOVIE_TITLE movietitle3_ on moviepacka2_.TITLE_ID=movietitle3_.TITLE_ID left outer join MOVIE_TITLE_ATTRIBUTES movietitle3_1_ on movietitle3_.TITLE_ID=movietitle3_1_.TITLE_ID where subscripti0_.SUBSCRIPTION_ID=:1 and subscripti0_.DATE_CHECK_IN>:2 and (subscripti0_.DATE_CHECK_IN is not null) order by subscripti0_.DATE_CHECK_IN DESC
    Explain Plan for this query:
    OPERATION OBJECT_NAME OPTIMIZER COST BYTES CARDINALITY CPU_COST IO_COST
    SELECT STATEMENT ALL_ROWS 148 1570 5 10090819 147
    SORT 148 1570 5 10090819 147
    NESTED LOOPS 147 1570 5 1237900 147
    NESTED LOOPS 142 1530 5 1191042 142
    NESTED LOOPS 141 1470 5 1174111 141
    NESTED LOOPS 129 1398 6 1073114 129
    NESTED LOOPS 117 1062 6 968996 117
    PARTITION HASH 111 732 6 911328 111
    TABLE ACCESS SUBSCRIPTION_RENTAL ANALYZED 111 732 6 911328 111
    INDEX INDX_SUB_RENTAL_SUB ANALYZED 3 10 43164 3
    TABLE ACCESS MOVIE_PRODUCT ANALYZED 1 55 1 9611 1
    INDEX PK_MOVIE_PRODUCT ANALYZED 0 1 1900 0
    TABLE ACCESS MOVIE_PACKAGE ANALYZED 2 56 1 17353 2
    INDEX PK_MOVIE_PACKAGE ANALYZED 1 1 9021 1
    TABLE ACCESS MOVIE_TITLE ANALYZED 2 61 1 16833 2
    INDEX PK_MOVIE_TITLE ANALYZED 1 1 9021 1
    TABLE ACCESS MOVIE_TITLE_ATTRIBUTES ANALYZED 1 12 1 9331 1
    INDEX PK_MOVIE_TITLE_ATTRIBUTES ANALYZED 0 1 1900 0
    TABLE ACCESS PRODUCT_AVAILABILITY ANALYZED 1 8 1 9371 1
    INDEX PRODUCT_AVAILABILITY_PK ANALYZED 0 1 1900 0
    I need the help very urgently. Kindly give me the solution immediately.
    Edited by: msora on Feb 10, 2009 3:19 AM

    msora wrote:
    Thanks Ozy,
    The query is using joins instead of subquery. The statistics are latest. the query is using indexes too.the optimzer_mode is all_rows.
    Now, you tell me what hint i should use to optimize this query?
    Thanks and Regards,
    MSORAHmm, urgent, immediately, its not Support MSORA. Be patient while asking for help or if its really urgent, open an SR with support.
    Your query is not able to be read. Format it using the { code }( without spaces) and post it. Also there is no such thing that you can just put any hint and query will be tuned. Trace your query with 10046 trace( search this forum for that) and paste its output here.
    Aman....

  • OLAP Query is Taking Time. Please give me the Solution.

    Hi Geof,
    I am new to this AW Cubes and all. I am facing with a problem. After reading u r responses and all I am asking u this question. I hope u will solve my problem.
    I trying to get the data out of cube using the below statement at SQL prompt.
    SELECT CONSTITUTION,ACTIVE_CODE,CLASSIFICATION,BR_CODE,CASTE,INTEREST_RATE,TOT_COUNT,OUTSTANDING_BAL FROM TABLE(OLAP_TABLE('MIS.KBL_REPORTS_AW DURATION SESSION',
    'DIMENSION CONSTITUTION AS varchar2(100) FROM AW_CUSTOMER_DIM1
    DIMENSION ACTIVE_CODE AS varchar2(50) FROM AW_ACTIVITY_DIM1
    DIMENSION CLASSIFICATION AS varchar2(50) FROM AW_PRODUCT_DIM1
    DIMENSION BR_CODE AS varchar2(50) FROM AW_BRANCH_DIM1
    DIMENSION CASTE AS varchar2(50) FROM AW_CASTE_DIM1
    DIMENSION INTEREST_RATE AS varchar2(50) FROM AW_INTEREST_DIM1
    MEASURE TOT_COUNT AS number(5) FROM KBL_REPORTS_CUBE1_COUNT_MEASURE
    MEASURE OUTSTANDING_BAL AS number(10) FROM KBL_REPORTS_CUBE1_BALANCE_MEASURE
    where CONSTITUTION like '%INDIVIDUAL%' and ACTIVE_CODE like '%010101';
    It is taking too much of time. Can u give the solution to me ???
    Regards,
    S.Vamsi Krishna

    Hi,
    What release are you using? You should use 10.2.0.2 if possible. The documentation references in this reply assume the 10.2.0.2 versions of the documentation.
    You may be able to add an empty MODEL clause to your query which has the paradoxical effect of speeding up most OLAP queries. See chapter 11 (OLAP_TABLE) in the Oracle OLAP Reference. But if performance is very poor, this is unlikely to improve matters enough.
    We need to figure out where the time is being spent. We can use Oracle trace files and the tkprof utility to do that. I'll describe the basics, but there is a lot more information in chapter 20 (Using Application Tracing Tools) of the Oracle Database Performance Tuning Guide.
    First, let's enable some configuration parameters that will cause the RDBMS to write some useful information to the trace file. Assuming that you have a SQL script that executes the query, you can add these commands to the beginning of the script:
    alter session set sql_trace=true
    alter session set timed_statistics=true
    alter session set "_olap_continuous_trace_file"=true
    alter session set "_olap_table_function_statistics"=true
    alter session set tracefile_identifier=perftest
    exec dbms_aw.execute('dotf tracefile');
    Now run the script with the query.
    Next we have to find the trace file. Trace files are written to the directory named by the configuration parameter user_dump_dest. As a privileged user, execute this command:
    SQL> show parameter user_dump_dest;
    Now look in that directory for a file whose name includes the string that we specified in the tracefile_identifier setting above (you can change this if you want):
    $ ls <user_dump_dest dir>/*perftest*.trc
    Having located the tracefile, run the tkprof utility:
    $ tkprof <trace file name> <tkprof output file name> aggregate=no
    Now edit the generated <tkprof output file name> and look for your query. It will be followed by a mini explain plan that includes a line for each subquery. You'll be able to see how much time is spent in each subquery and how many rows are returned to the enveloping query. The innermost subqueries will be the ones that query AW data. Your goal is to push as much of the work into the AW as possible, so that the AW engine return a minimal number of rows.
    You can get more detail from the trace file itself. If you are at all familiar with the OLAP DML, look for LIMIT commands and see that they roughly correspond to hierarchy selections and WHERE clause predicates in the SQL SELECT statement. OLAP DML comamnds have timestamps in the trace file, so you can get an idea of how long things are taking. You can find table function statistics by looking for XSTF and XSTABFUN in the trace file.
    Geof

  • For loop its taking time to execute if more records

    Hi
    I want to move the data with some condition and formatting which has 165000 rows in a table.
    I want use loop to fetch these records and move to another table. I am using for .. loop to execute, its taking long time .
    which way is better to execute fast?
    Thanks in advance,
    Maran

    user8732035 wrote:
    Hi
    I want to move the data with some condition and formatting which has 165000 rows in a table.
    I want use loop to fetch these records and move to another table. I am using for .. loop to execute, its taking long time .
    which way is better to execute fast?
    Thanks in advance,
    MaranLooping is bad... it is actually row-by-row processing of data(i.e. slow-by-slow processing).
    So, in place of using Pl/Sql, instead simply use a INSERT SQL query.
    insert into <table1>
    select col1,col2,... from <table2>
      where <condns>;HTH
    Ranit B.

  • Query takes much time while sum of yearly bases amount

    I have made query on the basis of joing to get payroll data it's woking fine but when we accumulate this on yearly basis while giving parameter from and to date then it takes much time, so how can we optimise this.
    please advice.

    this is query
    SELECT paa.assignment_id,MAX(EFFECTIVE_DATE) effective_date,
    paypa.business_group_id,paypa.payroll_id,
    nvl(SUM(decode(pet.element_type_id,10,decode(pivf.name,'Pay Value',TO_NUMBER(NVL(prrv.result_value, 0))))),0) AMOUNT
    FROM pay_assignment_actions paa,
    pay_payroll_actions paypa,
    pay_run_results prr,
    pay_element_types_f pet,
    pay_element_classifications pec,
    pay_run_result_values prrv,
    pay_input_values_f pivf
    where paypa.payroll_ACTION_id = paa.payroll_ACTION_id
    AND prr.assignment_ACTION_id = paa.assignment_ACTION_id
    AND paypa.action_status = 'C'
    AND paa.action_status = 'C'
    and paypa.action_type in ('Q','R')
    AND pet.element_type_id = prr.element_type_id
    AND pec.classification_id = pet.classification_id
    AND pivf.input_value_id=prrv.input_value_id
    AND prr.run_result_id = prrv.run_result_id
    AND pivf.element_type_id = pet.element_type_id
    AND paypa.effective_date BETWEEN pivf.effective_start_date AND pivf.effective_end_date
    AND paypa.effective_date BETWEEN pet.effective_start_date AND pet.effective_end_date
    AND paypa.effective_date between to_date('01-JUL-2010') AND TO_DATE('30-JUN-2011')
    group by paa.assignment_id,paypa.business_group_id,paypa.payroll_id
    any idea for this ,how can we improve performance,althoug it's woking fine without using group by function
    Edited by: oracle0282 on Mar 31, 2011 11:36 PM

  • Query takes long time to execute.

    Hi All,
    I have one query that takes 5 minutes to execute.
    The query depends on four tables.
    The table IBS_WORK_BANKDATA and IBS_ORG_BANKDATA contains 25 lack records. Table IBS_CURRENCYMASTER have 250 records and IBS_CURRENCYEEXCHANGERATE have 50 records.
    Out put of query contains 3500 records.
    Oracle version is 9.0.1.1 and OS is windows 2003 server.
    Query:
    select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
    wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
    wrk.bd_matcd as MATCD, wrk.bd_c_u_cd as C_U_CD, wrk.bd_s_u_cd as S_U_CD,
    0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
    case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
    wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
    ' ' as TrackChangs
    from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
    and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
    and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11'
    left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
    left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
    and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1
    Explain Plan:
    SELECT STATEMENT, GOAL = CHOOSE               Cost=26     Cardinality=1     Bytes=157
    SORT UNIQUE               Cost=26     Cardinality=1     Bytes=157
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_ORG_BANKDATA     Cost=2     Cardinality=204     Bytes=2856
    NESTED LOOPS               Cost=26     Cardinality=1     Bytes=157
    NESTED LOOPS OUTER               Cost=24     Cardinality=1     Bytes=143
    NESTED LOOPS OUTER               Cost=23     Cardinality=1     Bytes=93
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_WORK_BANKDATA     Cost=22     Cardinality=1     Bytes=52
    INDEX SKIP SCAN     Object owner=RBI     Object name=IBS_WORK_BANKDATA_IDX     Cost=7     Cardinality=1     
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYMASTER     Cost=1     Cardinality=178     Bytes=7298
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYEXCHANGERATE     Cost=1     Cardinality=19     Bytes=950
    INDEX RANGE SCAN     Object owner=RBI     Object name=IBS_ORG_BANKDATA_IDX     Cost=1     Cardinality=204     
    Please help me.
    Thanks in advance,
    Prathamesh.

    Hi prathemesh,
    Check whether the tables accessed by the query are recently analyzed.
    Thanks,
    Sathis.

Maybe you are looking for

  • Updated to iTunes 7.6 and now i can't connect to the store

    I getting an error message saying it timed out. This happened when i first downloaded iTunes 7.5 on my new Vista running computer a month ago but i fixed it by going into Norton and putting iTunes to allow. I went to go do the same thign because mayb

  • Loose wire/chip soundcard on motherboar​d?? HP Pavallion zv5000

    A couple of months ago, my laptop was dropped from a short distance.  Since then my sound has been going away and being flakey....  I can make it come back by pushing on the outside case, so I'm fairly sure it's something loose.  My issue is this:  i

  • Help identifying a wall wart / charger

    Was cleaning out behind one of my PCs and I came across a really dusty AC adapter that I'm not entirely sure what it belongs to, other than to some Creative product since that's who's name is labeled on it. If I had to guess I'd say it belongs to an

  • Merge/create new space in pdf?

    I have one scanned magazine page which has an article (in German) on one side and an advertisement on the other. I wish to remove the advertisement and put in a blank space (so I can put in some translation to English). These are the various ways I h

  • Best practice for Source NATTING ?

    Is there a general design rule for configuring source NATing ? Is it best to configure the CSS is one/two armed mode. What are the perfomance limitations in doing this ? Can soure NATed and non source NATed content rules be configured on the CSS with