Parallel hint causes a query to run slower?

I have an insert...select query where the select is a join between a table with one billion rows (although there is a where clause on an indexed column that restricts it to "only" 300 million), a table with 30 million rows, and a table with about 100,000 rows, where the result is about 20 rows. When I first ran it, it took about 2 hours. I added a Parallel hint, and explain plan showed that it was being used (and v$session showed that I had about 30 additional connections while it ran). but not it takes four hours.
Is there a reason parallel processing would cause a query to run slower?
insert /*+ append */ into employees_by_age_group
  pay_plan
, age_range
, pay_level
, fy
, employee_count
select /*+ parallel */
       emp.pay_plan
     , to_char(d.min_age) || '-' || to_char(d.max_age) as age_range
     , emp.pay_level
     , pay.fy
     , count(pay.employee_id) as employee_count
from
  select /*+ index(pay_info pay_info_index_on_site) */
         employee_id
       , extract(year from (dte_ppe_end + 92)) as fy
       , count(employee_id) as num_recs
  from pay_info
  where extract(month from dte_ppe_end) = 10
  and   extract(day from dte_ppe_end) between 14 and 27
  and   substr(pay_type, 1, 1) IN ('A', 'B', 'C')
  and   site like 'Z%'
  group by employee_id, extract(year from (dte_ppe_end + 92))
) pay
join
  select employee_id
       , pay_plan
       , pay_grade
       , pay_step
       , file_date
  from
    select /*+ index(employee_info employee_info_index_on_site) */
           employee_id
         , pay_level
         , file_date
         , max(file_date)
           over (partition by extract(year from (file_date + 61)))
           as last_file_date
    from employee_info
    where site like 'Z%'
  where file_date = last_file_date
) emp
on (
     emp.employee_id = pay.employee_id
     and extract(year from emp.file_date) = pay.fy - 1
join (
       select employee_id
            , dob
       from (
              select employee_id
                   , date_birth
                   , row_number() over (partition by employee_id order by date_file desc) as r
              from employee_birthdates
              where site like 'Z%'
       where r = 1
     ) dob
on dob.employee_id = pay.employee_id
join
            select 20 as min_age, 24 as max_age from dual
  union all select 25 as min_age, 29 as max_age from dual
  union all select 30 as min_age, 34 as max_age from dual
  union all select 35 as min_age, 39 as max_age from dual
  union all select 40 as min_age, 44 as max_age from dual
  union all select 45 as min_age, 49 as max_age from dual
  union all select 50 as min_age, 54 as max_age from dual
  union all select 55 as min_age, 59 as max_age from dual
  union all select 60 as min_age, 64 as max_age from dual
  union all select 65 as min_age, 69 as max_age from dual
  union all select 70 as min_age, 74 as max_age from dual
  union all select 75 as min_age, 79 as max_age from dual
  union all select 80 as min_age, 84 as max_age from dual
  union all select 85 as min_age, 89 as max_age from dual
  union all select 90 as min_age, 94 as max_age from dual
  union all select 95 as min_age, 99 as max_age from dual
) d
group by emp.pay_plan, d.min_age, d.max_age, emp.pay_level, pay.fy;

Paul - here are three different explain plans
First, the original one (without the parallel hint):
INSERT STATEMENT  ALL_ROWS                                              Cost: 26,684,255  Bytes: 114  Cardinality: 1                     
  35 LOAD AS SELECT EMPLOYEES_BY_AGE_GROUP                  
    34 HASH GROUP BY                                                    Cost: 26,684,255  Bytes: 114  Cardinality: 1                 
      33 NESTED LOOPS                                                   Cost: 26,684,254  Bytes: 114  Cardinality: 1               
        14 HASH JOIN                                                    Cost: 26,684,222  Bytes: 108  Cardinality: 1             
          9 MERGE JOIN                                                  Cost: 4,408,803  Bytes: 8,322  Cardinality: 146           
            3 VIEW DONBOT_DBA.                                          Cost: 114,863  Bytes: 29,625,180  Cardinality: 987,506         
              2 WINDOW SORT PUSHED RANK                                 Cost: 114,863  Bytes: 35,550,216  Cardinality: 987,506       
                1 TABLE ACCESS FULL TABLE EMPLOYEE_BIRTHDATES           Cost: 108,983  Bytes: 35,550,216  Cardinality: 987,506     
            8 SORT JOIN                                                 Cost: 4,293,940  Bytes: 3,645  Cardinality: 135         
              7 VIEW DONBOT_DBA.                                        Cost: 4,293,939  Bytes: 3,645  Cardinality: 135       
                6 SORT GROUP BY                                         Cost: 4,293,939  Bytes: 4,185  Cardinality: 135     
                  5 TABLE ACCESS BY INDEX ROWID TABLE PAY_INFO          Cost: 4,293,938  Bytes: 4,185  Cardinality: 135   
                    4 INDEX RANGE SCAN INDEX PAY_INFO_INDEX_ON_SITE     Cost: 487,124  Cardinality: 402,683,034 
          13 VIEW DONBOT_DBA                                            Cost: 22,275,300  Bytes: 1,160,143,257  Cardinality: 22,747,907           
            12 WINDOW SORT                                              Cost: 22,275,300  Bytes: 841,672,559  Cardinality: 22,747,907         
              11 TABLE ACCESS BY INDEX ROWID TABLE EMPLOYEE_INFO        Cost: 22,137,046  Bytes: 841,672,559  Cardinality: 22,747,907       
                10 INDEX RANGE SCAN INDEX EMPLOYEE_INFO_INDEX_ON_SITE   Cost: 50,419  Cardinality: 38,019,281     
        32 VIEW DONBOT_DBA
          31 UNION-ALL           
            15 FAST DUAL  Cost: 2  Cardinality: 1         
            16 FAST DUAL  Cost: 2  Cardinality: 1         
            17 FAST DUAL  Cost: 2  Cardinality: 1         
            18 FAST DUAL  Cost: 2  Cardinality: 1         
            19 FAST DUAL  Cost: 2  Cardinality: 1         
            20 FAST DUAL  Cost: 2  Cardinality: 1         
            21 FAST DUAL  Cost: 2  Cardinality: 1         
            22 FAST DUAL  Cost: 2  Cardinality: 1         
            23 FAST DUAL  Cost: 2  Cardinality: 1         
            24 FAST DUAL  Cost: 2  Cardinality: 1         
            25 FAST DUAL  Cost: 2  Cardinality: 1         
            26 FAST DUAL  Cost: 2  Cardinality: 1         
            27 FAST DUAL  Cost: 2  Cardinality: 1         
            28 FAST DUAL  Cost: 2  Cardinality: 1         
            29 FAST DUAL  Cost: 2  Cardinality: 1         
            30 FAST DUAL  Cost: 2  Cardinality: 1          Next, one with the parallel hint:
INSERT STATEMENT  ALL_ROWS                                                                              Cost: 26,507,111  Bytes: 114  Cardinality: 1                                       
  51 LOAD AS SELECT EMPLOYEES_BY_AGE_GROUP
    50 PX COORDINATOR                                          
      49 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10005 :Q1005                                     Cost: 26,507,111  Bytes: 114  Cardinality: 1                                 
        48 HASH GROUP BY PARALLEL_COMBINED_WITH_PARENT :Q1005                                           Cost: 26,507,111  Bytes: 114  Cardinality: 1                               
          47 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1005                                            Cost: 26,507,111  Bytes: 114  Cardinality: 1                             
            46 PX SEND HASH PARALLEL_TO_PARALLEL SYS.:TQ10004 :Q1004                                    Cost: 26,507,111  Bytes: 114  Cardinality: 1                           
              45 HASH GROUP BY PARALLEL_COMBINED_WITH_PARENT :Q1004                                     Cost: 26,507,111  Bytes: 114  Cardinality: 1                         
                44 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1004                                    Cost: 26,507,111  Bytes: 114  Cardinality: 1                       
                  25 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1004                                     Cost: 26,507,109  Bytes: 108  Cardinality: 1                     
                    17 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1004                                  Cost: 4,301,500  Bytes: 4,104  Cardinality: 72                   
                      16 PX SEND HASH PARALLEL_TO_PARALLEL SYS.:TQ10003 :Q1003                          Cost: 4,301,500  Bytes: 4,104  Cardinality: 72                 
                        15 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1003                               Cost: 4,301,500  Bytes: 4,104  Cardinality: 72               
                          7 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1003           
                            6 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1003                           Cost: 4,293,939  Bytes: 1,809  Cardinality: 67           
                              5 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000                     Cost: 4,293,939  Bytes: 1,809  Cardinality: 67         
                                4 VIEW DONBOT_DBA.                                                      Cost: 4,293,939  Bytes: 1,809  Cardinality: 67       
                                  3 SORT GROUP BY                                                       Cost: 4,293,939  Bytes: 2,077  Cardinality: 67     
                                    2 TABLE ACCESS BY INDEX ROWID TABLE PAY_INFO                        Cost: 4,293,938  Bytes: 2,077  Cardinality: 67   
                                      1 INDEX RANGE SCAN INDEX PAY_INFO_INDEX_ON_SITE                   Cost: 487,124  Cardinality: 199,756,151 
                          14 VIEW PARALLEL_COMBINED_WITH_PARENT DONBOT_DBA. :Q1003                      Cost: 7,561  Bytes: 29,625,180  Cardinality: 987,506             
                            13 WINDOW SORT PUSHED RANK PARALLEL_COMBINED_WITH_PARENT :Q1003             Cost: 7,561  Bytes: 35,550,216  Cardinality: 987,506           
                              12 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1003                        Cost: 7,561  Bytes: 35,550,216  Cardinality: 987,506         
                                11 PX SEND HASH PARALLEL_TO_PARALLEL SYS.:TQ10002 :Q1002                Cost: 7,561  Bytes: 35,550,216  Cardinality: 987,506       
                                  10 WINDOW CHILD PUSHED RANK PARALLEL_COMBINED_WITH_PARENT :Q1002      Cost: 7,561  Bytes: 35,550,216  Cardinality: 987,506     
                                    9 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002             Cost: 7,557  Bytes: 35,550,216  Cardinality: 987,506   
                                      8 TABLE ACCESS FULL TABLE PARALLEL_COMBINED_WITH_PARENT EMPLOYEE_BIRTHDATES :Q1002     Cost: 7,557  Bytes: 35,550,216  Cardinality: 987,506 
                    24 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1004                 
                      23 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1004                                Cost: 22,205,605  Bytes: 575,504,145  Cardinality: 11,284,395                 
                        22 PX SEND HASH PARALLEL_FROM_SERIAL SYS.:TQ10001                               Cost: 22,205,605  Bytes: 575,504,145  Cardinality: 11,284,395               
                          21 VIEW DONBOT_DBA.                                                           Cost: 22,205,605  Bytes: 575,504,145  Cardinality: 11,284,395             
                            20 WINDOW SORT                                                              Cost: 22,205,605  Bytes: 417,522,615  Cardinality: 11,284,395           
                              19 TABLE ACCESS BY INDEX ROWID TABLE EMPLOYEE_INFO                        Cost: 22,137,046  Bytes: 417,522,615  Cardinality: 11,284,395         
                                18 INDEX RANGE SCAN INDEX EMPLOYEE_INFO_INDEX_ON_SITE                   Cost: 50,419  Cardinality: 18,859,958       
                  43 VIEW PARALLEL_COMBINED_WITH_PARENT DONBOT_DBA. :Q1004                              Cost: 32  Bytes: 6  Cardinality: 1                     
                    42 UNION-ALL PARALLEL_COMBINED_WITH_PARENT :Q1004                 
                      26 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      27 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      28 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      29 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      30 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      31 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      32 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      33 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      34 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      35 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      36 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      37 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      38 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      39 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      40 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                 
                      41 FAST DUAL PARALLEL_COMBINED_WITH_PARENT :Q1004         Cost: 2  Cardinality: 1                  Finally, one without the parallel hint, and without the index hint on PAY_TABLE:
INSERT STATEMENT  ALL_ROWS                                              Cost: 23,348,654  Bytes: 114  Cardinality: 1                   
  34 LOAD AS SELECT ARMYMP.EMPLOYEES_BY_AGE                
    33 HASH GROUP BY                                                    Cost: 23,348,654  Bytes: 114  Cardinality: 1               
      32 NESTED LOOPS                                                   Cost: 23,348,653  Bytes: 114  Cardinality: 1             
        13 HASH JOIN                                                    Cost: 23,348,621  Bytes: 108  Cardinality: 1           
          8 MERGE JOIN                                                  Cost: 1,073,202  Bytes: 8,322  Cardinality: 146         
            3 VIEW DONBOT_DBA.                                          Cost: 114,863  Bytes: 29,625,180  Cardinality: 987,506       
              2 WINDOW SORT PUSHED RANK                                 Cost: 114,863  Bytes: 35,550,216  Cardinality: 987,506     
                1 TABLE ACCESS FULL TABLE EMPLOYEE_BIRTHDATES           Cost: 108,983  Bytes: 35,550,216  Cardinality: 987,506   
            7 SORT JOIN                                                 Cost: 958,339  Bytes: 3,645  Cardinality: 135       
              6 VIEW DONBOT_DBA.                                        Cost: 958,338  Bytes: 3,645  Cardinality: 135     
                5 SORT GROUP BY                                         Cost: 958,338  Bytes: 4,185  Cardinality: 135   
                  4 TABLE ACCESS FULL TABLE PAY_INFO                    Cost: 958,337  Bytes: 4,185  Cardinality: 135 
          12 VIEW DONBOT_DBA.                                           Cost: 22,275,300  Bytes: 1,160,143,257  Cardinality: 22,747,907         
            11 WINDOW SORT                                              Cost: 22,275,300  Bytes: 841,672,559  Cardinality: 22,747,907       
              10 TABLE ACCESS BY INDEX ROWID TABLE EMPLOYEE_INFO        Cost: 22,137,046  Bytes: 841,672,559  Cardinality: 22,747,907     
                9 INDEX RANGE SCAN INDEX EMPLOYEE_INFO_UIC              Cost: 50,419  Cardinality: 38,019,281   
        31 VIEW DONBOT_DBA.                                             Cost: 32  Bytes: 6  Cardinality: 1           
          30 UNION-ALL         
            14 FAST DUAL  Cost: 2  Cardinality: 1       
            15 FAST DUAL  Cost: 2  Cardinality: 1       
            16 FAST DUAL  Cost: 2  Cardinality: 1       
            17 FAST DUAL  Cost: 2  Cardinality: 1       
            18 FAST DUAL  Cost: 2  Cardinality: 1       
            19 FAST DUAL  Cost: 2  Cardinality: 1       
            20 FAST DUAL  Cost: 2  Cardinality: 1       
            21 FAST DUAL  Cost: 2  Cardinality: 1       
            22 FAST DUAL  Cost: 2  Cardinality: 1       
            23 FAST DUAL  Cost: 2  Cardinality: 1       
            24 FAST DUAL  Cost: 2  Cardinality: 1       
            25 FAST DUAL  Cost: 2  Cardinality: 1       
            26 FAST DUAL  Cost: 2  Cardinality: 1       
            27 FAST DUAL  Cost: 2  Cardinality: 1       
            28 FAST DUAL  Cost: 2  Cardinality: 1       
            29 FAST DUAL  Cost: 2  Cardinality: 1        I am surprised the cost without the index is less than the cost with it, considering that it is replacing a Table Access By Index Rowid with a Table Access Full on a table with 1 billion (1000 million) records.
Igor - two questions:
One - I cannot find "Materialize" in the hints in the SQL Reference anywhere. What does it do?
Two - does replacing subqueries with With clauses make that much of a difference?

Similar Messages

  • I have an iMac 07 model and it has been running slow at start up.  Does a three year old hard drive cause your computer to run slow?

    I was told by a second source store today that the hard drives in an iMac 07 model run slower with time, mine is a little over three years old.  Is this an accurate statement?

    Computer slow downs can be caused by numerous things, age is not one of them. There is some really good reading here, I'm sure if you look 25 Ways to Speed Up Your Mac closely you will be able to regain some lost performance.
    BTW in your signature you list some antivirus software....that could be a cause right there as it's not needed on a Mac.
    Roger

  • Script on page causing flash player to run slow

    I am trying to use webmaker( magix) and as I get to the load
    page I get this message... script on this page is making flash
    player run slow and may cause computer to be unresponsive do you
    want to abort after 4 days of trying could anyone tell me what the
    problem could be please

    I don't understand why I would use onEnterFrame(). The entire
    program only needs one frame to exist on, but maybe I don't
    understand how Flash needs to manage these things. I am a C++/Cocoa
    programmer rewriting a program that my boss made years ago in
    Visual BASIC. What made it work for him was to call DoEvents every
    600 itterations, which pauses the execution so that the system can
    catch up with it's own stuff. Are you saying that onEnterFrame will
    do this too? How will this work if the calculation only starts when
    a button is pressed. Does the entire calculation routine need to
    take place on a different frame?
    Could you explain these things?

  • Query Is Running Slow

    Hi all,
    I am runnig the query first time but it is taking very much time to run query . are there any parameter which we need to set from BIW when we run the query first time ?
    when i try to dril down any char. or when i try to move any free characteristic to rows it is taking very much time.
    please tell me the steps to improve the performance.
    Regards,
    Komik Shah

    Hi,
    This info may be helpful.
    General tips
    Using aggregates and compression.
    Using  less and complex cell definitions if possible.
    1. Avoid using too many nav. attr
    2. Avoid RKF and CKF
    3. Many chars in row.
    By using T-codes ST03 or ST03N
    Go to transaction ST03 > switch to expert mode > from left side menu > and there in system load history and distribution for a particual day > check query execution time.
    /people/andreas.vogel/blog/2007/04/08/statistical-records-part-4-how-to-read-st03n-datasets-from-db-in-nw2004
    /people/andreas.vogel/blog/2007/03/16/how-to-read-st03n-datasets-from-db
    Try table rsddstats to get the statistics
    Using cache memoery will decrease the loading time of the report.
    Run reporting agent at night and sending results to email.This will ensure use of OLAP cache. So later report execution will retrieve the result faster from the OLAP cache.
    4. Go to SE38 > Run the program SAP_INFOCUBE_DESIGNS
    It will shown dimension Vs Fact tables Size in percent.If you mean speed of queries on a cube as performance metric of cube,measure query runtime.
    3. To check the performance of the aggregates,see the columns valuation and usage in aggregates.
    Open the Aggregates...and observe VALUATION and USAGE columns.
    "---" sign is the valuation of the aggregate. You can say -3 is the valuation of the aggregate design and usage. ++ means that its compression is good and access is also more (in effect, performance is good). If you check its compression ratio, it must be good. -- means the compression ratio is not so good and access is also not so good (performance is not so good).The more is the positives...more is useful the aggregate and more it satisfies the number of queries. The greater the number of minus signs, the worse the evaluation of the aggregate. The larger the number of plus signs, the better the evaluation of the aggregate.
    if "-----" then it means it just an overhead. Aggregate can potentially be deleted and "+++++" means Aggregate is potentially very useful.
    Refer.
    http://help.sap.com/saphelp_nw70/helpdata/en/b8/23813b310c4a0ee10000000a114084/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/60/f0fb411e255f24e10000000a1550b0/frameset.htm
    Note 356732 - Performance Tuning for Queries with Aggregates
    5. Run your query in RSRT and run the query in the debug mode. Select "Display Aggregates Found" and "Do not use cache" in the debug mode. This will tell you if it hit any aggregates while running. If it does not show any aggregates, you might want to redesign your aggregates for the query.
    Also your query performance can depend upon criteria and since you have given selection only on one infoprovider...just check if you are selecting huge amount of data in the report
    Check for the query read mode in RSRT.(whether its A,X or H)..advisable read mode is X.
    Generate Report in RSRT  
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
    Achieving BI Query Performance Building Business Intelligence
    http://www.dmreview.com/issues/20051001/1038109-1.html
    Performance Tuning with the OLAP Cache
    http://www.sapadvisors.com/resources/Howto...PerformanceTuningwiththeOLAPCache$28pdf$29.pdf
    Business Intelligence Journal Improving Query Performance in Data Warehouses
    http://www.tdwi.org/Publications/BIJournal/display.aspx?ID=7891
    Achieving BI Query Performance Building Business Intelligence
    http://www.dmreview.com/issues/20051001/1038109-1.html
    Hope this helps.
    Thanks,
    JituK

  • Why query is running slow....?morning evrything is fine...

    in the morning all queries r running well..?
    but now what happened...
    evry query is taking half an hour to run?
    what might be the possible reasons?
    problem is not in my system...some server issue...what might be that?
    Message was edited by:
            neeraja devi

    Hi neeraja,
    As said above ,you Can check in  RSRTand OLAPCACHE.In RSRt,You can also check whether the query is hitting the right aggregates or not to pull the data.
    Apart from this, you can also Check with BW statistics and check where the problem lies
    <b>And another  important T-code is St03n.</b> .here you can analyse why  the query is taking more time than required to execute.
    As far as problem is concerned,if it is a server issue,please contact your Basis Consultant and also verify the Rfc connection.
    Regards,
    amar

  • New IOS download causing game apps to run slower

    Since I've downloaded the new IOS my game apps (especially words with friends) is running significantly slower.  Is anybody else experiencing the same?

    *****...sorry...I did not have that happen...mine stayed in place... something may have gone slightly wrong during your upgrade

  • SQl query are running slow in comparison to oracle 8i

    Hi everybody,
    I have two systems one is Oracle 9i on Windows 2000 and
    one is Oracle 8i running on Windows 2000. The database structure is the same. When I run the following qry in
    Oracle 9i
    SELECT COUNT (a.aint_ac_no) AS total_ac_no, adet_int_rate,
    SUM (fun_max_cbal_bal (a.aint_ac_no,
    a.aint_subsys_cd,
    TO_DATE ('30/01/2009', 'DD/MM/YYYY')
    ) AS balance
    FROM domst120 a, domst730 b
    WHERE a.aint_interest_slab_cd = b.adet_srno
    AND a.aint_subsys_cd = '137'
    AND fun_max_cbal_bal (a.aint_ac_no,
    a.aint_subsys_cd,
    TO_DATE ('30/01/2009', 'DD/MM/YYYY')
    ) <> 0
    AND a.aint_eff_date =
    (SELECT MAX (c.aint_eff_date)
    FROM domst120 c
    WHERE a.aint_bank_cd = c.aint_bank_cd
    AND a.aint_branch_cd = c.aint_branch_cd
    AND a.aint_bank_cd = '857'
    AND a.aint_branch_cd = '6'
    AND a.aint_subsys_cd = c.aint_subsys_cd
    AND a.aint_ac_no = c.aint_ac_no)
    GROUP BY b.adet_int_rate
    ORDER BY b.adet_int_rate
    it takes 6 min to complete.
    the same qry running in Oracle 8i takes 2 seconds
    to complete.
    The index structure is same in both systems also the tables
    were analyzed with compute statistics.

    What do you expect?! Oracle 9i and Oracle 8i are different particularly by optimizer cost-based(9i) and rule-based(8i) :)
    what about both execution plans?

  • What would cause my imac to run slow

    Loading apps like Mail and Safari appear to take a few seconds longer than normal.
    Also there is a significant delay when opening e-mails.

    Disregard the recommendation to leave 10% free drive space. Disregard any recommendation that suggests leaving free any percentage. OSX needs ~10GB free, plus you need to leave adequate room for expansion of your files. Only you can know how much is necessary. Right now, if you have at least around 15-20GB free, then drive space is not an issue.
    The suggestion to repair Disk Permissions is also useless. If you're running Lion or above, then disregard the suggestion to clear out your Desktop.
    Open Activity Monitor in Utilties and post a screenshot like the one below of the bottom only of the System Memory tab.
    Open up Disk Utility in Utilities and select the drive to see if SMART status is verified or not.
    Also in Activity Monitor, switch to the CPU tab>All Process to see if anything is using an inordinate amount of CPU. Also, see if something is using an inordinate amount of Real Memory.

  • Query running slow

    Below query is running slow is there any other way to write the query which will enhance the performance.
    select ld.cst_fle_seq,
         tf.date_pro,
         lj.case_num ,
         ca.reference,
         rr.rej_txt
    from
         load_judg lj,
         rej_rea rr ,
         pl_case ca,
         tp_files tf ,
         tp tp
    where rr.rej_code(+) = ld.rej_code
    and ca.case_num (+)=lj.case_num
    and tp.seq =tf.seq
    and lj.cred_code(+) =tp.cst_code
    and tp.format =9
    and valid=''Y''
    and tf.fle_name like ''%F%''
    and lj.rej_code is not null
    and trunc(date_pro)=trunc(sysdate)
    Thanks in advance
    Jha

    Here is the explan plan of the query
    - SELECT STATEMENT Optimizer=CHOOSE (Cost=16 Card=1 Bytes=225)
    -NESTED LOOPS (Cost=16 Card=1 Bytes=225)
    -NESTED LOOPS (OUTER) (Cost=15 Card=1 Bytes=192)
    - HASH JOIN (Cost=14 Card=1 Bytes=147)
    - MERGE JOIN (CARTESIAN) (Cost=9 Card=4 Bytes=432)
    -TABLE ACCESS (FULL) OF LOAD_JUDGMENTS (Cost=1 Card=1 Bytes=69)
    - SORT (JOIN)
    -TABLE ACCESS (FULL) OF TAPE_FILES
    -TABLE ACCESS (FULL) OF TAPES (Cost=4 Card=418 Bytes=16302)
    -TABLE ACCESS (BY ROWID) OF REJECT_REASONS
    -INDEX (UNIQUE SCAN) OF REJ_PK (UNIQUE)
    -TABLE ACCESS (BY ROWID) OF CASES
    -INDEX (UNIQUE SCAN) OF CASE_PK (UNIQUE)
    sorry, as I have checked the tables and its not a cartesian.
    Thanks
    Jha

  • Can my itunes cause my macbook pro to run slow

    MacBook Pro 17 inch mid 2010, OSX 10.9.4, 2.53GHz Intel Core1.5, 4 GB
    Can my Itunes library (it's large) cause my MacBook to run slow?  Constantly getting the beachball.  Have taken it to the Apple store and have dumped the system totally off the computer and reinstalled only the OS and Itunes again.  Beyond slow.  Takes at least 10 minutes to boot up if I turn it off.

    If this started happening without your having made any changes and without a warning of low disk space, then it's likely that the startup drive, or some other hardware component, is failing. Back up all data immediately, then run Apple Diagnostics or the Apple Hardware Test.
    Even if the test is negative, you should make a "Genius" appointment at an Apple Store to have the machine tested more thoroughly.

  • Parallel Hint !!

    Hello Gurus
    I m using prallel hint ...i belive the syntax of parallel hint is something like this
    /*+ Parallel(tablename, degree) */But when i try with just degree without tablename, it works absolutely fine .... So my question is can i use parallel hint without tablename jus by mentioning degree
    ..like this
    /*+    parallel(32) */My concern is, the query is has been deployed to production without the tablename being mentioned in parallel hint....so how serious is this ?? BUt when i run the query in dev without table name mentioning in parallel hint in Development area its running fine ...
    So do u guys hav any suggestions!!
    Thanks !!
    Edited by: user642297 on May 26, 2010 11:13 AM

    user642297 wrote:
    I'm surprised it works without tablename (or alias for that tablename).
    Yes it did work ...it did not through me any error!!
    Hints that don't work because the syntax is not correct are just comments, they do not generate any errors.
    SQL> select count(*) from
      2  (select o.owner, count(*) from all_objects o,
      3    (select level from dual connect by level <= 5)
      4     group by o.owner);
      COUNT(*)
           176
    Elapsed: 00:01:07.01
    SQL> edi
    Wrote file afiedt.sql
      1  select /*+ go_faster */ count(*) from
      2  (select o.owner, count(*) from all_objects o,
      3    (select level from dual connect by level <= 5)
      4*    group by o.owner)
    SQL> /
      COUNT(*)
           176
    Elapsed: 00:01:12.57

  • Macbook pro 2008 running slow

    Im sorry if im reposting something somebody else has already poasted but I couldnt find this topic in the forum.
    I have a 15" Macbook Pro bought December 2008 is my memory serves me correct
    The specifics are
    Model Name: MacBook Pro
    Model Identifier: MacBookPro5,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.53 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 6 MB
    Memory: 4 GB
    Bus Speed: 1.07 GHz
    I have about 129GB free, what I dont understand why it runs so slowly. I've run Disk Utilities and no errors or problems show up and frequently run CleanMyMac. I have recently installed Adobe CS5 but with 4GB RAM but I dont see why this would cause the computer to run slower as I should have enough ram. Can I upgrade to 6GB? Is there any other reason to why my computer would be running so slow? Applications often crash, or it can take me up to 5 min just closing an application down.
    Thanks for the help!

    I have the same era MBP and recently had to change to a new hard drive. I upgraded to a faster 7200 rpm drive and have no regrets. FYI, you don't have to buy a drive from them, but OtherWorld Computing does hace very helpful HD install videos (http://eshop.macsales.com/installvideos/macbookpro15_unibodyhd/) and also a handy $30 gizmo, the "USB 2 Universal Drive Adapter" that allows you to setup your new HD before installing into the MBP. Of course, if you already have a fast external FW drive you might not need it, but it worked like a charm. Also, the actual HD install in a unibody MBP literally only takes a couple of minutes.

  • Is using Parallel Hint /*+PARALLEL */  good or bad?

    Hi,
    I am facing problem in using /*+ PARALLEL */ hint in SQL Query its taken long time to execute.
    Is using PARALLEL Hint degrades performance?
    The Table FCT_TABLE is having PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT ) clause.
    We are using parallel hint as SELECT /*+ PARALLEL(FCT_TABLE 2)
    Any help will be needful for me.
    Thanks and Regards

    user598986 wrote:
    We have noticed the following from the Server:
    1.The Disk I/O is showing 0 always during the time of Execution of the Query.
    2.The I/O Adapter is showing 700%.What is the o/s and version? Do you use any virtualisation? What storage system do you use? What RAID levels, if any? And how did you monitor these results?
    Note that the physical I/O layer is not part of the database layer. From the database layer you typically address I/O issues with
    - logical design (e.g. normalise data so that there's a single copy of the data to maintain and thus less I/O)
    - physical design (e.g. use partitioning, IOTs, clusters, indexes and so on to facilitate less I/O to process data)
    - parallelise (use multiple processes to perform large I/O scans to address some of the inherited latency issues when doing I/O)
    - reduce I/O (e.g. by truncating a table or partition instead of deleting it, using CTAS, design s/w that only needs to make a single pass through a data set, etc)
    From the database app level you have no control over where the data is stored, how it is stored and cached. So, as PL/SQL or app developer, your primary concern should be the amount of I/O your data model and app needs - as that is something you can and do control. And not worry about the physical implementation of the I/O layer. As that should be the concern of the sys admin and DBA of that platform.

  • Avoiding Parallel hints on a view

    Hi All,
    I am trying to avoid using Hints on a view.
    Database: 11gr2.
    Scenario:
    I created a view
    CREATE OR REPLACE VIEW customer_count_vw
    AS SELECT /*+ NO_PARALLEL(T) */ COUNT(1) FROM customer;
    When I see the explain plan it is going for a FULL TABLE Scan.
    But When I use a hint on top of the view like
    SELECT /*+ PARALLEL(A,12) */ * FROM customer_count_vw;
    The explain plan is using the PARALLEL Hint.
    Is there any way we can avoid this hint being applied on this view.
    The reason why we want this scenario is , we are going to expose the view to the external people and if they force PARALLEL on the view, it will give a lot of problem for us in the PRODUCTION environment.
    Appreciate your response.
    THANKS,
    MK.

    >
    we are going to expose the view to the external people and if they force PARALLEL on the view, it will give a lot of problem for us in the PRODUCTION environment.
    >
    You can't keep a query writer from using a PARALLEL hint in a query. But you can add a LOGON trigger that disables PARALLEL execution for the user sessions that you don't want to perform parallel ops. If you do that then PARALLEL will not be used for any other queries that session uses.

  • Power book runs slow and locks up

    My powerbook G4 runs slow and then locks up and I have to force quit. A window pops up and say something to the effect that:
    " a script is runing in this movie causing Macromedia Flash to run slow. If I dont turn it off it will get worst."
    I am not runing a movie (?) nor a script that I know of. What can I do?

    Welcome to the Apple discussions.
    One place to start is to load the activity monitor, on your hard disk in applications/utilities, look at active tasks, and see what's running.

Maybe you are looking for

  • Adding more RAM to iMac 24"

    Hey Everyone, I'm considering buying a 24" iMac. I've been told that a way to save some money, is to get the RAM from elsewhere and install it myself. I'm just checking whether this is actually possible and how hard it is to actually do it. Please he

  • Doc Category TABLE name

    Dear Members : While creating Bill of Lading and Packing Slip document Category, can I mention OE_TRANSACTION_TYPES_ALL as the table name, could you please guide ? As this can not be changed later on. Thanks in advance. Atanu

  • How to use wmode="transparent" on Quicktime

    Hi! I use tag <embed> with wmode="transparent" inside the <embed> tag to make the vdo file (.mp4 , .mov) to be transparent display behind other div on Firefox, but it doesn't work and quick time play and vdo disappear. I have check Apple QuickTime Tu

  • My Mac has lost the keyboard command to zoom in and out (Apple/shift/ /-)  How can I restore this?

    My Mac has lost the keyboard command to zoom in and out (Apple/shift/ /-)  How can I restore this?

  • SU 2006-002v1.0 vs1.1

    My poor brain is addlepated. I've tracked this for hours now, guess there was nothing better to do. P~) To keep this simple. SU 2006-002v1.0 is installed 3/13/06 3.03 pm and working fine. SU 2006-002v1.1 never showed up in Software Update. Any point