How to tune this smiple SQL (takes long time to come up with results)

the following SQL is very slow as it takes one day to complete...
select A.* from (SELECT a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_type, a.v_company_code,
a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) agentname,
PKG_AGE__TAX.GET_TAX_AMT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO) comm,
c.v_ird_region
FROM agent_master a, agent_lob b, agency_region c
WHERE a.n_agent_no = b.n_agent_no
AND a.v_agency_region = c.v_agency_region
--AND :p_lob_code = DECODE(:p_lob_code,'ALL', 'ALL',b.v_line_of_business)
--AND :p_channel_no = DECODE(:p_channel_no,1000, 1000,a.n_channel_no)
--AND :p_agency_group = DECODE(:p_agency_group,'ALL', 'ALL',c.v_ird_region)
group by a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_type, a.v_company_code, a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) ,
BPG_AGENCY_GEN_ACL_TAX.BFN_GET_TAX_AMOUNT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO),
c.v_ird_region
ORDER BY c.v_ird_region, a.v_agent_code DESC)
A
WHERE (COMM < :P_VAL_IND OR COMM >=:P_VAL_IND1);
. .it should return all the agents with commission based on the date parameter... data is less then 50 K inside all
the tables...
the version is Oracle9i Enterprise Edition Release 9.2.0.5.0
SQL>  explain plan for
  2   select A.* from (SELECT a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_
no, a.v_agent_type, a.v_company_code,
  3  a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) agentname,
  4  BPG_AGENCY_GEN_ACL_TAX.BFN_GET_TAX_AMOUNT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO) com
m,
  5  c.v_ird_region
  6  FROM ammm_agent_master a, ammt_agent_lob b, gnlu_agency_region c
  7  WHERE a.n_agent_no = b.n_agent_no
  8  AND a.v_agency_region = c.v_agency_region
  9  --AND :p_lob_code = DECODE(:p_lob_code,'ALL', 'ALL',b.v_line_of_business)
10  --AND :p_channel_no = DECODE(:p_channel_no,1000, 1000,a.n_channel_no)
11  --AND :p_agency_group = DECODE(:p_agency_group,'ALL', 'ALL',c.v_ird_region)
12  group by a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_ty
pe, a.v_company_code, a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) ,
13  BPG_AGENCY_GEN_ACL_TAX.BFN_GET_TAX_AMOUNT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO),
14  c.v_ird_region
15  ORDER BY c.v_ird_region, a.v_agent_code DESC)
16  A
17  WHERE (COMM < :P_VAL_IND OR COMM >=:P_VAL_IND1);
Explained.
SQL>  select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
| Id  | Operation                       |  Name               | Rows  | Bytes |TempSpc| Cost (%CPU)|
|   0 | SELECT STATEMENT                |                     | 13315 |    27M|       |   859  (63)|
|   1 |  VIEW                           |                     | 13315 |    27M|       |            |
|   2 |   SORT GROUP BY                 |                     | 13315 |   936K|  2104K|   859  (63)|
|   3 |    HASH JOIN                    |                     | 13315 |   936K|       |   641  (81)|
|   4 |     MERGE JOIN                  |                     |  3118 |   204K|       |   512  (86)|
|   5 |      TABLE ACCESS BY INDEX ROWID| AGENCY_REGION  |     8 |   152 |       |     3  (34)|
|   6 |       INDEX FULL SCAN           | SYS_C004994         |     8 |       |       |     2  (50)|
|   7 |      SORT JOIN                  |                     |  3142 |   147K|       |   510  (86)|
|   8 |       TABLE ACCESS FULL         | AGENT_MASTER   |  3142 |   147K|       |   506  (86)|
|   9 |     TABLE ACCESS FULL           | AGENT_LOB      |   127K|   623K|       |   102  (50)|
Note: PLAN_TABLE' is old version
17 rows selected.
..This is the only information i can get as i cannot access over database server (user security limitation)...
Thank You

Try to remove this:
ORDER BY c.v_ird_region, a.v_agent_code DESCOr move it to the end of entire query.
Edited by: Random on Jun 19, 2009 1:01 PM

Similar Messages

  • How to tune this SQL (takes long time to come up with results)

    Dear all,
    I have sum SQL which takes long time ... can any one help me to tune this.... thank You
    SELECT SUM (n_amount)
    FROM (SELECT DECODE (v_payment_type,
    'D', n_amount,
    'C', -n_amount
    ) n_amount, v_vou_no
    FROM vouch_det a, temp_global_temp b
    WHERE a.v_vou_no = TO_CHAR (b.n_column2)
    AND b.n_column1 = :b5
    AND b.v_column1 IN (:b4, :b3)
    AND v_desc IN (SELECT v_trans_source_code
    FROM benefit_trans_source
    WHERE v_income_tax_app = :b6)
    AND v_lob_code = DECODE (:b1, :b2, v_lob_code, :b1)
    UNION ALL
    SELECT DECODE (v_payment_type,
    'D', n_amount,
    'C', -n_amount
    * -1 AS n_amount,
    v_vou_no
    FROM vouch_details a, temp_global_temp b
    WHERE a.v_vou_no = TO_CHAR (b.n_column2)
    AND b.n_column1 = :b5
    AND b.v_column1 IN (:b12, :b11, :b10, :b9, :b8, :b7)
    AND v_desc IN (SELECT v_trans_source_code
    FROM benefit_trans_source
    WHERE income_tax_app = :b6)
    AND v_lob_code = DECODE (:b1, :b2, v_lob_code, :b1));
    Thank You.....

    Thanks a lot,
    i did change the SQL it works fine but slows down my main query.... actually my main query is calling a function which does the sum......
    here is the query.....?
    select A.* from (SELECT a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_type, a.v_company_code,
    a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) agentname,
    PKG_AGE__TAX.GET_TAX_AMT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO)  comm,
    c.v_ird_region
    FROM agent_master a, agent_lob b, agency_region c
    WHERE a.n_agent_no = b.n_agent_no
    AND a.v_agency_region = c.v_agency_region
    AND :p_lob_code = DECODE(:p_lob_code,'ALL', 'ALL',b.v_line_of_business)
    AND :p_channel_no = DECODE(:p_channel_no,1000, 1000,a.n_channel_no)
    AND :p_agency_group = DECODE(:p_agency_group,'ALL', 'ALL',c.v_ird_region)
    group by a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_type, a.v_company_code, a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) ,
    BPG_AGENCY_GEN_ACL_TAX.BFN_GET_TAX_AMOUNT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO),
    c.v_ird_region
    ORDER BY c.v_ird_region, a.v_agent_code DESC)
    A
    WHERE (COMM < :P_VAL_IND OR      COMM >=:P_VAL_IND1);
    Any idea to make this faster....
    Thank You...

  • Analyze a Query which takes longer time in Production server with ST03 only

    Hi,
    I want to Analyze a Query which takes longer time in Production server with ST03 t-code only.
    Please provide me with detail steps as to perform the same with ST03
    ST03 - Expert mode- then I need to know the steps after this. I have checked many threads. So please don't send me the links.
    Write steps in detail please.
    <REMOVED BY MODERATOR>
    Regards,
    Sameer
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:14 PM

    Then please close the thread.
    Greetings,
    Blag.

  • Custom Integrator Takes Long time to Come in Integrator List

    Hello Friends
    I am facing a serious problem, when I create a Custom Integrator in Desktop Integrator module. It takes long time to populate in Integrator List. Almost 24 Hours. But it’s time consuming. Please help me if anybody knows the solution so that I can get it after creation integrator.
    Thanks
    Makshud

    Do you have the statistics collected up to date?
    Can you find any error/warning messages in the BNE log file?
    Thanks,
    Hussein

  • Sql takes long time

    Dear all,
    The following sql takes more than 2 minutes to execute.
    select * from ( select historyent0_.TRANSACTION_ID as col_0_0_, historyent0_.TRANSACTION_HISTORY_ID as col_1_0_
    from TRANSACTION_HISTORY historyent0_ where (historyent0_.TRANSACTION_HISTORY_ID in
    (select max(historyent1_.TRANSACTION_HISTORY_ID) from TRANSACTION_HISTORY historyent1_ group by
    historyent1_.TRANSACTION_ID)) and historyent0_.TRANSACTION_STATE_ID<4 and historyent0_.USER_NAME<>:1 )
    where rownum <= :2;
    I have created an index
    (TRANSACTION_HISTORY_ID,TRANSACTION_ID)
    The Plan is :
    SELECT STATEMENT  ALL_ROWSCost: 107,479  Bytes: 227.286.444  Cardinality: 5.411.582
      6 COUNT STOPKEY
        5 HASH JOIN  Cost: 107,479  Bytes: 227.286.444  Cardinality: 5.411.582
          3 VIEW VIEW SYS.VW_NSO_1 Cost: 45,87  Bytes: 76.148.033  Cardinality: 5.857.541
            2 HASH GROUP BY  Cost: 45,87  Bytes: 70.290.492  Cardinality: 5.857.541
              1 INDEX FAST FULL SCAN INDEX NIBC_FOP_AED.TEST_TRAN_HIST_IDX Cost: 8,756  Bytes: 140.464.128  Cardinality: 11.705.344
          4 TABLE ACCESS FULL TABLE NIBC_FOP_AED.TRANSACTION_HISTORY Cost: 43,995  Bytes: 156.935.878  Cardinality: 5.411.582Can someone please suggest

    You can try this and see if it helps.
    Issue is you are getting millions of rows in return and then you're doing where rownum< .... So the
    query has to run in full in any case.
    Try to use first rows hint if you care about getting immediate results.
    Try performing fts
    convert your rownum < :xyz into an actual column filter from the refined rows.....
    Cheers
    www.oraclefusions.com
    Please visit my site for free performance tuning oracle tools.
    The only real time Server-side SQL Sniffer tool developed:http://www.oraclefusions.com/applications.html#sniffer

  • DrawImage takes long time for images created with Photoshop

    Hello,
    I created a simple program to resize images using the drawImage method and it works very well for images except images which have either been created or modified with Photoshop 8.
    The main block of my code is
    public static BufferedImage scale(  BufferedImage image,
                                          int targetWidth, int targetHeight) {
       int type = (image.getTransparency() == Transparency.OPAQUE) ?
                        BufferedImage.TYPE_INT_RGB :
                        BufferedImage.TYPE_INT_RGB;
       BufferedImage ret = (BufferedImage) image;
       BufferedImage temp = new BufferedImage(targetWidth, targetHeight, type);
       Graphics2D g2 = temp.createGraphics();
       g2.setRenderingHint
             RenderingHints.KEY_INTERPOLATION, 
             RenderingHints.VALUE_INTERPOLATION_BICUBIC
       g2.drawImage(ret, 0, 0, targetWidth, targetHeight, null);
       g2.dispose();
       ret = temp;
       return ret;
    }The program is a little longer, but this is the gist of it.
    When I run a jpg through this program (without Photoshop modifications) , I get the following trace results (when I trace each line of the code) telling me how long each step took in milliseconds:
    Temp BufferedImage: 16
    createGraphics: 78
    drawimage: 31
    dispose: 0
    However, the same image saved in Photoshop (no modifications except saving in Photohop ) gave me the following results:
    Temp BufferedImage: 16
    createGraphics: 78
    drawimage: 27250
    dispose: 0
    The difference is shocking. It took the drawImage process 27 seconds to resize the file in comparison to 0.78 seconds!
    My questions:
    1. Why does it take so much longer for the drawImage to process the file when the file is saved in Photoshop?
    2. Are there any code improvements which will speed up the image drawing?
    Thanks for your help,
    -Rogier

    You saved the file in PNG format. The default PNGImagReader in core java has a habit of occasionally returning TYPE_CUSTOM buffered images. Photoshop 8 probably saves the png file in such a way that TYPE_CUSTOM pops up more.
    And when you draw a TYPE_CUSTOM buffered image onto a graphics context it almost always takes an unbearably long time.
    So a quick fix would be to load the file with the Toolkit instead, and then scale that image.
    Image img = Toolkit.getDefaultToolkit().createImage(/*the file*/);
    new ImageIcon(img);
    //send off image to be scaled A more elaborate fix involves specifying your own type of BufferedImage you want the PNGImageReader to use
    ImageInputStream in = ImageIO.createImageInputStream(/*file*/);
    ImageReader reader = ImageIO.getImageReaders(in).next();
    reader.setInput(in,true,true);
    ImageTypeSpecifier sourceImageType = reader.getImageTypes(0).next();
    ImageReadParam readParam = reader.getDefaultReadParam();
    //to implement
    configureReadParam(sourceImageType, readParam);
    BufferedImage img = reader.read(0,readParam);
    //clean up
    reader.dispose();
    in.close(); The thing that needs to be implemented is the method I called configureReadParam. In this method you would check the color space, color model, and BufferedImage type of the supplied ImageTypeSpecifier and set a new ImageTypeSpecifier if need be. The method would essentially boil down to a series of if statements
    1) If the image type specifier already uses a non-custom BufferedImage, then all is well and we don't need to do anything to the readParam
    2) If the ColorSpace is gray then we create a new ImageTypeSpecifier based on a TYPE_BYTE_GRAY BufferedImage.
    3) If the ColorSpace is gray, but the color model includes alpha, then we need to do the above and also call seSourceBands on the readParam to discard the alpha channel.
    3) If the ColorSpace is RGB and the color model includes alpha, then we create a new ImageTypeSpecifier based on an ARGB BufferedImage.
    4) If the ColorSpace if RGB and the color model doesn't include alpha, then we create a new ImageTypeSpecifier based on TYPE_3BYTE_BGR
    5) If the ColorSpace is not Gray or RGB, then we do nothing to the readParam and ColorConvertOp the resulting image to an RGB image.
    If this looks absolutely daunting to you, then go with the Toolkit approach mentioned first.

  • Takes long time to drpo tables with large numbers of partitions

    11.2.0.3
    This is for a build. We are still in development. No risk of data loss. As part of the build, I drop the user,re-create it, re-create the objects. Allows us to test the build all the way through. Its our process.
    This user has some tables with several 1000 partitions. I ran a 10046 trace and oracle is using pl/sql to do loops to do DML against the data dictionary. Anyway to speed this up? I am going to turn off the recyclebin during the build and turn it back on.
    anything else I can do? Right now I just issue 'drop user cascade'. Part of is the weak hardware we have in the development/environment. Takes about 20 minutes just to run through this part of the script (the script has alot more pieces than this) and we do fairly frequent builds.
    I can't change the build process. My only option is to try to make this run a little faster. I can't do anything about the hardware (lots of VMs crammed onto too few servers).
    This is not a production issue. Its more of a hassle.

    Support Note 798586.1 shows that DROP USER CASCADE was slower than dropping individual objects -- at least in 10.2    Not sure if it still the case in 11.2
    Hemant K Chitale

  • How to tune this query for the improve performance ?

    Hi All,
    How to tune this query for the improve performance ?
    select a.claim_number,a.pay_cd,a.claim_occurrence_number,
    case
    when sum(case
    when a.payment_status_cd ='0'
    then a.payment_est_amt
    else 0
    end
    )=0
    then 0
    else (sum(case
    when a.payment_status_cd='0'and a.payment_est_amt > 0
    then a.payment_est_amt
    else 0
    end)
    - sum(case
    when a.payment_status_cd<>'0'
    then a.payment_amt
    else 0
    end))
    end as estimate
    from ins_claim_payment a
    where a.as_of_date between '31-jan-03' and '30-aug-06'
    and ( a.data_source = '25' or (a.data_source between '27' and '29'))
    and substr(a.pay_cd,1,1) IN ('2','3','4','8','9')
    group by a.claim_number, a.pay_cd, a.claim_occurrence_number
    Thank you,
    Mcka

    Mcka
    As well as EXPLAIN PLAN, let us know what proportion of rows are visited by this query. It may be that it is not using a full table scan when it should (or vice versa).
    And of course we'd need to know what indexes are available, and how selective they are for the predicated you have in this query ...
    Regards Nigel

  • In indianvisa App. page; when I clicking a link in this page after a long time (2 hours), it shows me session expired. how can i solve it? Please.

    http://indianvisa-bangladesh.nic.in/visa/indianVisaRegDetails.jsp; this is page link. I want to stay in this page for a long time but i can't, they show me a message "session expired". Also I set an add-on namely Session Keeper but don't implement it. Please solve my issue.
    Thanks
    Bishwajit Das

    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies<br> '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • Procedure takes long time to execute...

    Hi all
    i wrote the proxcedure but it takes long time to execute.
    The INterdata table contains 300 records.
    Here is the procedure:
    create or replace procedure inter_filter
    is
         /*v_sessionid interdata.sessionid%type;
         v_clientip interdata.clientip%type;
         v_userid interdata.userid%type;
         v_logindate interdata%type;
         v_createddate interdata%type;
         v_sourceurl interdata%type;
         v_destinationurl interdata%type;*/
         v_sessionid filter.sessionid%type;
         v_filterid filter.filterid%type;
         cursor c1 is
         select sessionid,clientip,browsertype,userid,logindate,createddate,sourceurl,destinationurl
         from interdata;
         cursor c2 is
         select sessionid,filterid
         from filter;
    begin
         open c2;
         loop
              fetch c2 into v_sessionid,v_filterid;
              for i in c1 loop
                   if i.sessionid = v_sessionid then
                        insert into filterdetail(filterdetailid,filterid,sourceurl,destinationurl,createddate)
                        values (filterdetail_seq.nextval,v_filterid,i.sourceurl,i.destinationurl,i.createddate);
                   else
                        insert into filter (filterid,sessionid,clientip,browsertype,userid,logindate,createddate)
                        values (filter_seq.nextval,i.sessionid,i.clientip,i.browsertype,i.userid,i.logindate,i.createddate);
                        insert into filterdetail(filterdetailid,filterid,sourceurl,destinationurl,createddate)
                        values (filterdetail_seq.nextval,filter_seq.currval,i.sourceurl,i.destinationurl,i.createddate);
                   end if;
              end loop;
         end loop;
         commit;
    end
    Please Help!
    Prathamesh

    i wrote the proxcedure but it takes long time to execute.Please define "long time". How long does it take? What are you expecting it to take?
    The INterdata table contains 300 records.But how many records are there in the FILTER table? As this is the one you are driving off this is going to determine the length of time it takes to complete. Also, this solution inserts every row in the INTERDATA table for each row in the FILTER table - in other words, if the FILTER table has twenty rows to start with you are going to end up with 6000 rows in FILTERDETAIL. No wonder it takes a long time. Is that want you want?
    Also of course, you are using PL/SQL cursors when you ought to be using set operations. Did you try the solution I posted in Re: Confusion in this  scenario>>>>>>> on this topic?
    Cheers, APC

  • Normal is takes long time

    Dear Experts, i tried to enable audit option in oracle 10.2 .0 database which is running on windows box, after set this command , i tried to restart the DB with shutdown (only) option.
    ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE;
    but its takes long time to complete i checked the alert log file , its showing
    ALTER SYSTEM SET audit_trail='DB' SCOPE=SPFILE;
    Wed Feb 01 12:23:48 2012
    Starting background process EMN0
    EMN0 started with pid=29, OS id=4836
    Wed Feb 01 12:23:49 2012
    Shutting down instance: further logons disabled
    Wed Feb 01 12:23:50 2012
    Stopping background process QMNC
    Streams Apply Server P001 pid=16 OS id=3708 stopped
    Wed Feb 01 12:23:51 2012
    Stopping background process CJQ0
    Streams Apply Reader P000 pid=15 OS id=3660 stopped
    Wed Feb 01 12:23:52 2012
    Errors in file e:\oracle\product\10.2.0\admin\std\bdump\psacc_p000_3660.trc:
    ORA-10388: parallel query server interrupt (failure)
    Streams Apply Server P004 pid=25 OS id=2124 stopped
    Wed Feb 01 12:23:52 2012
    Errors in file e:\oracle\product\10.2.0\admin\std\bdump\psacc_p004_2124.trc:
    ORA-10388: parallel query server interrupt (failure)
    Wed Feb 01 12:23:53 2012
    Errors in file e:\oracle\product\10.2.0\admin\std\bdump\psacc_p001_3708.trc:
    ORA-10388: parallel query server interrupt (failure)
    Streams Apply Server P002 pid=23 OS id=2404 stopped
    Wed Feb 01 12:23:53 2012
    Errors in file e:\oracle\product\10.2.0\admin\std\bdump\psacc_p002_2404.trc:
    ORA-10388: parallel query server interrupt (failure)
    Streams Apply Server P003 pid=24 OS id=1372 stopped
    Wed Feb 01 12:23:54 2012
    Errors in file e:\oracle\product\10.2.0\admin\std\bdump\psacc_p003_1372.trc:
    ORA-10388: parallel query server interrupt (failure)
    Wed Feb 01 12:23:54 2012
    Stopping background process MMNL
    Wed Feb 01 12:23:54 2012
    Streams APPLY A001 with pid=17, OS id=3400 stopped
    Wed Feb 01 12:23:55 2012
    Stopping background process MMON
    Wed Feb 01 12:23:57 2012
    Shutting down instance (normal)
    License high water mark = 21
    Wed Feb 01 12:23:57 2012
    Stopping Job queue slave processes
    Wed Feb 01 12:23:57 2012
    Job queue slave processes stopped
    Wed Feb 01 12:28:57 2012
    Active process 2572 user 'SYSTEM' program 'ORACLE.EXE (SHAD)'
    Active process 3156 user 'SYSTEM' program 'ORACLE.EXE (SHAD)'
    Active process 3416 user 'SYSTEM' program 'ORACLE.EXE (SHAD)'
    Active process 5596 user 'SYSTEM' program 'ORACLE.EXE (SHAD)'
    Active process 5200 user 'SYSTEM' program 'ORACLE.EXE (SHAD)'
    Active process 5980 user 'SYSTEM' program 'ORACLE.EXE (SHAD)'
    SHUTDOWN: waiting for logins to complete.
    Wed Feb 01 12:43:28 2012
    MMNL absent for 1203 secs; Foregrounds taking over
    there is no more info after this line..... can any one please help on this , how to solve this issue... waiting for morethan 40 mins stil is running... guide me to proceed next step to complete this.... thanks in advance

    Use anothe command prompt and type sqlplus.
    For e.g in my system.
    C:\Documents and Settings\ranjit>sqlplus
    SQLPlus: Release 11.2.0.1.0 Production on Wed Feb 1 13:46:33 2012*
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Enter user-name: sys as sysdba
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    *SQL>
    Once you saw this.. type "shu abort;"
    This will abruptly shutdown the database. It is safe to run in non production databases however. And while starting up, it will to the recovery(which may take some time again to startup database).
    Regards

  • Table count itself takes long time

    Hi,
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I have an table which contains only few records. INSERT,UPDATE(DML) operations happening more often on this table.
    When i try to count records of this table itself taking long time.
    Select count(*) from test;
    But when i do count of table for some of the big tables takes very less time compare to this.
    Guide me what are all the steps i need to measure?
    Regards,
    Faiz

    mafaiz wrote:
    Hi,
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I have an table which contains only few records. INSERT,UPDATE(DML) operations happening more often on this table.
    When i try to count records of this table itself taking long time.
    Select count(*) from test;
    But when i do count of table for some of the big tables takes very less time compare to this.
    Guide me what are all the steps i need to measure?This question is not APEX-specific and is more appropriate to the {forum:id=75} forum, making use of the Re: 3. How to  improve the performance of my query? / My query is running slow..

  • My view take long time

    SELECT DISTINCT xxxx
    TO_CHAR(TRUNC(MTRAN.DAT_TRANSACTION_MTRAN), 'YYYY') DAT_TRANSACTION_MTRAN,
    NVL((SELECT DISTINCT SUM(MTRAN1.QTY_PRIMARY_MTRAN)
    FROM MAM_MATERIAL_TRANSACTIONS MTRAN1
    WHERE TO_CHAR(TRUNC(MTRAN1.DAT_TRANSACTION_MTRAN),
    'YYYY') =
    TO_CHAR(TRUNC(MTRAN.DAT_TRANSACTION_MTRAN),
    'YYYY')
    AND TO_CHAR(TRUNC(MTRAN1.DAT_TRANSACTION_MTRAN),
    'MM') = '01'
    AND MTRAN1.MTYP_TRANSACTION_TYPE_ID IN
    (41, 42, 43, 44, 45)
    AND MTRAN1.ITEM_ITEM_ID_FOR = MTRAN.ITEM_ITEM_ID_FOR),
    0) QTY_FARVARDIN,
    NVL((SELECT DISTINCT SUM(MTRAN1.QTY_PRIMARY_MTRAN)
    FROM M
    i have a view like above with 10 select to select on one table.
    this view take long time to execute ,how could i decrese this time!

    user498843 wrote:
    SELECT DISTINCT xxxx
    TO_CHAR(TRUNC(MTRAN.DAT_TRANSACTION_MTRAN), 'YYYY') DAT_TRANSACTION_MTRAN,
    NVL((SELECT DISTINCT SUM(MTRAN1.QTY_PRIMARY_MTRAN)
    FROM MAM_MATERIAL_TRANSACTIONS MTRAN1
    WHERE TO_CHAR(TRUNC(MTRAN1.DAT_TRANSACTION_MTRAN),
    'YYYY') =
    TO_CHAR(TRUNC(MTRAN.DAT_TRANSACTION_MTRAN),
    'YYYY')
    AND TO_CHAR(TRUNC(MTRAN1.DAT_TRANSACTION_MTRAN),
    'MM') = '01'
    AND MTRAN1.MTYP_TRANSACTION_TYPE_ID IN
    (41, 42, 43, 44, 45)
    AND MTRAN1.ITEM_ITEM_ID_FOR = MTRAN.ITEM_ITEM_ID_FOR),
    0) QTY_FARVARDIN,
    NVL((SELECT DISTINCT SUM(MTRAN1.QTY_PRIMARY_MTRAN)
    FROM M
    i have a view like above with 10 select to select on one table.
    this view take long time to execute ,how could i decrese this time!Thread: HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting

  • BPM Process chain takes long time to process

    We have BI7, Netweaver 2004s on Oracle and SUN Solaris
    There is a process chain (BPM) which pulls data from the CRM system into BW. The scheduled time to run this chain is 0034 hrs. This chain should ideally complete before / around 0830 Hrs. <b>Now the problem is that every alternate day this chain behaves normally and gets completed well before 0830 hrs but every alternate day this chain fails…</b> there are almost 40 chains running daily. Some are event triggered (dependent with each other) or some run in parallel. In this, (BPM) process chain, usually there are 5 requests with 3 Delta and 2 full uploads (Master Data). The delta uploads finishes in 30 minutes without any issues with very few record transfers. The first full upload is from 0034 hrs to approximately 0130 hrs and the 2nd upload is from 0130 hrs to 0230 hrs. Now if the 1st upload gets delayed then the people who are initiating these chains, stop the 2nd full upload and continue it after all the process chains are completed. Now this entire BPM process chain sometimes takes 17 -18 hrs to complete!!!!!
    No other loads in CRM or BW when these process chains are running
    CRM has background jobs to push IDOCS to BW which run every 2 minutes which runs successfully
    Yesterday this chain got completed successfully (well within stipulated time) with over 33,00,000 records transferred but sometimes it has failed to transfer even 12,00,000 records!!
    Attaching a zip file, please refer the “21 to 26 Analysis screen shot.doc” from the zip file
    Within the zip file, attaching “Normal timings of daily process chains.xls” – the name explains it….
    Also within the zip file refer “BPM Infoprovider and data source screen shot.doc” please refer this file as the infopackage (page 2) which was used in the process chain is not displayed later on in page number 6 BUT CHAIN GOT SUCESSFULLY COMPLETED
    We have analyzed:--
    1)     The PSA data for BPM process chain for past few days
    2)     The info providers for BPM process chain for past few days
    3)     The ODS entries for BPM process chain for past few days
    4)     The point of failure of BPM process chain for past few days
    5)     The overall performance of all the process chains for past few days
    6)     The number of requests in BW for this process chain
    7)     The load on CRM system for past few days when this process chain ran on BW system
    As per our analysis, there are couple of things which can be fixed in the BW system:--
    1)     The partner agreement (transaction WE20) defined for the partner LS/BP3CLNT475 mentions both message types RSSEND and RSINFO: -- collect IDOCs and pack size = 1 Since the pack size = 1 will generate 1 TRFC call per IDOC, it should be changed to 10 so that less number of TRFCs will be generated thus less overhead for the BW server resulting in the increase in performance
    2)     In the definition of destination for the concerned RFC in BW (SM59), the “Technical Setting” tab says the “Load balancing” option = “No”. We are planning to make it “Yes”
    But we believe that though these changes will bring some increase in performance, this is not the root cause of the abnormal behavior of this chain as this chain runs successfully on every alternate day with approximately the same amount of load in it.
    I was not able to attach the many screen shots or the info which I had gathered during my analysis. Please advice how do I attach these files
    Best Regards,

    Hi,
    Normally  index  creation or deletion can take long time in case  your database statistics are not updated properly, so can check  stat  after your data loading is completed and index generation is done,  Do creation of database statistics.
    Then try to recheck ...
    Regards,
    Satya

  • Report takes long time for few records

    hi frends,
    I m facing one problem with my Web based erp application which is developed in .net , in my application when i open the  report from my applicaiton , in my temp folder there one file gets created name is "rpt conmgr cache"
    bcoz of this for few records also my report takes too much time and opens very slow and it takes long time, and it happens in some of the reports only , other reports are working cool and its not creating any file in temp folder,,, so can u guide me whats this file and what can be the solution for it,
    Thanks
    Mithun

    hi sabhajit,
    i have already checked the sql query it is taking less then seconds.
    any other steps u want me to check then pls let me know?
    thanks mithun

Maybe you are looking for

  • AP Issue with Tax Jurisdiction

    Hello AP Guru's- I have a situation where were are adding line items to an invoice with a PO.  The tax jurisdiction code is correct but when we add a G/L, it is pulling the wrong tax jurisdiction code?  Where is SAP pulling this tax jurisdiction code

  • How to add new column in Report ME2L

    Dear Sir, We are using ME2L for various purposes . In the ME2L report we need to add 2 new columns i.e Item Delivery Date and WBS Element . Although in the standard ME2L report , after the basic list generation , there have been provided 2 icons for

  • Old Dos Program

    HI all I've got an old dos program that has a feature that I cannot get to work in DosBox. Of course it just so happens to be the most important Part. Has any one got a way to run a old dos system in Full Screen Mode as a bundle? This would be most u

  • Linux applicatio​n fonts

    Reposted from erroneous post on Labwindows/CVI - sorry I am having the problem of different font behaviour when transferring applications from windows to linux.  After trying various things without much success I am left with some questions:- 1     

  • Ear file transport problem

    Hi Gurus, A new Java web-dynpro application developed in development system, and after transported into productive portal. Everything ok. After that I modify the java program and transported the modified ear file into the QAS portal. The application