Query in other schema take long time????

Hi All,
I am working on two different schemas in the same database say A and B.
In schema A, I have a table tbl which is having approximately 70,000 rows.
The table tbl is having an index. When I query on this table tbl in schema A the query out put is given in 10 minutes.
But when I query on the same table tbl in schema B the out put takes an hour.
Please explain me the reason why the query takes such a long time in schema B.
Thanks in advance
Kaustubh

Please post the execution plans of the query from both databases.
Do you have proper statistics gathered on these tables?

Similar Messages

  • My mac shutdown suddenly fr0m time to other and take long time to open

    hi everybody,
    I think i have big problem ,i have macbookpro I5 13" early 2011  , i just changed the board to I7 ( used  board got it from net ) after USB ports in my original logicboard are damaged due to drop  , after changing the board the mac is unstable, it take long time(half hour!) to show up anything after press power,  yes I press power and there are no response  from the mac (black monitor as its ) , just   i hear  a noise from the empty CD drive . once it open it work fine for a while (may 2 hours or more ) and then shutdown suddenly! and you have wait more than half hour to open it again if im lucky.
    Itried to rest the mac many times, replace the RAM places , i thought may the problem come from overheating the CPU, i monitored the CPU tempreture just before the suddenly shutdown was 57C
    please help ,any suggetions ?

    Run an Apple hardware Test:
    support.apple.com/kb/ht1509http://
    You may have to use OPTION D to start it.
    See what that picks up. 
    You may also bring the MBP to an Apple store or AASP for a diagnostic evaluation.
    Ciao.

  • My query take long time..

    The output of tkprof of my trace file is :
    SELECT ENEXT.NUM_PRSN_EMPLY ,ENEXT.COD_BUSUN ,ENEXT.DAT_CALDE ,ENEXT.COD_SHFT
    FROM
    AAC_EMPLOYEE_ENTRY_EXITS5_VIW ENEXT ,PDS.PDS_EMPLOYEES EMPL ,
    PDS.PDS_EMPLOYMENT_TYPES EMPTYP ,PDS.PDS_PAY_CONDITIONS PAYCON WHERE
    ENEXT.DAT_CALDE BETWEEN :B6 AND :B5 AND ENEXT.NUM_PRSN_EMPLY IN (SELECT
    ATT21 FROM APPS.GLOBAL_TEMPS WHERE ATT1 = 'PRSN') AND ENEXT.NUM_PRSN_EMPLY =
    EMPL.NUM_PRSN_EMPLY AND EMPL.EMTYP_COD_EMTYP = EMPTYP.COD_EMTYP AND
    EMPTYP.LKP_COD_STA_PAY_EMTYP <> 3 AND
    NVL(EMPL.LKP_MNTLY_WITHOUT_ENEXT_EMPLY,2) <> 1 AND EMPL.PCOND_COD_STA_PCOND
    = PAYCON.COD_STA_PCOND AND NVL(EMPL.LKP_MNTLY_WITHOUT_ENEXT_EMPLY,2) <> 1
    AND PAYCON.LKP_FLG_STA_PAY_PCOND = 1 AND ENEXT.DAT_CALDE >=
    EMPL.DAT_EMPLT_EMPLY AND ENEXT.DAT_CALDE <= NVL(EMPL.DAT_DSMSL_EMPLY,
    TO_DATE('15001229','YYYYMMDD')) AND 1 = (CASE WHEN
    ENEXT.LKP_STA_HOLIDAY_CALNR = 2 AND ENEXT.LKP_CAT_SHFT_SHTAB = 1 AND
    ENEXT.TYP_DAY BETWEEN 4 AND 6 THEN 0 WHEN ENEXT.LKP_STA_HOLIDAY_CALNR = 2
    AND ENEXT.LKP_CAT_SHFT_SHTAB = 1 AND ENEXT.TYP_DAY NOT BETWEEN 4 AND 6 THEN
    1 WHEN ENEXT.LKP_STA_HOLIDAY_CALNR = 2 AND ENEXT.LKP_CAT_SHFT_SHTAB = 2
    THEN 0 WHEN ENEXT.LKP_STA_HOLIDAY_CALNR = 1 AND ENEXT.LKP_CAT_SHFT_SHTAB =
    1 THEN 1 WHEN ENEXT.LKP_STA_HOLIDAY_CALNR = 1 AND ENEXT.LKP_CAT_SHFT_SHTAB =
    2 THEN 0 END) AND ENEXT.LKP_COD_DPUT_BUSUN = NVL(:B4 ,
    ENEXT.LKP_COD_DPUT_BUSUN) AND ENEXT.LKP_COD_MANAG_BUSUN = NVL(:B3 ,
    ENEXT.LKP_COD_MANAG_BUSUN) AND ENEXT.COD_BUSUN = NVL(:B2 , ENEXT.COD_BUSUN)
    AND ENEXT.COD_CAL = NVL(COD_CAL, ENEXT.COD_CAL) AND ENEXT.NUM_PRSN_EMPLY =
    NVL(:B1 , ENEXT.NUM_PRSN_EMPLY) AND ENEXT.COD_SHFT IN (SELECT
    SHFTBL.COD_SHTAB FROM AAC_SHIFT_TABLES SHFTBL WHERE
    SHFTBL.LKP_CAT_SHFT_SHTAB = 1) AND ENEXT.DAT_CALDE NOT IN (SELECT ABN.DAT
    FROM APPS.AAC_EMPL_EN_EX_ABNORMAL_VIW ABN WHERE ABN.PRSN =
    ENEXT.NUM_PRSN_EMPLY AND ABN.DAT BETWEEN :B6 AND :B5 ) AND ENEXT.DAT_CALDE
    IN (SELECT EMPENEXT.DAT_STR_SHFT_ENEXT FROM AAC.AAC_EMPLOYEE_ENTRY_EXITS
    EMPENEXT WHERE EMPENEXT.EMPLY_NUM_PRSN_EMPLY = EMPL.NUM_PRSN_EMPLY AND
    EMPENEXT.DAT_STR_SHFT_ENEXT BETWEEN :B6 AND :B5 AND
    EMPENEXT.LKP_FLG_STA_ENEXT <> 3) ORDER BY ENEXT.NUM_PRSN_EMPLY,
    ENEXT.DAT_CALDE
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 0
    Fetch 2 40.45 40.30 306 17107740 0 24
    total 6 40.45 40.30 306 17107740 0 24
    what is wrong in my query?
    why it take long time?

    user13344656 wrote:
    what is wrong in my query?
    why it take long time?See PL/SQL forum FAQ
    https://forums.oracle.com/forums/ann.jspa?annID=1535
    *3. How to improve the performance of my query? / My query is running slow.*
    SQL and PL/SQL FAQ
    For instructions on what information to post an how to format it.

  • Installing patch 5217019 takes long time.

    Hi,
    I will install patch 5217019.But it does not complete succesfuly.Compiling apps schema takes long time I think.There are a lot of invalid objects.
    please help me to install patch 5217019.
    thanks.

    This is an EBS patch for WF Notificaton Mailer. What are your OS and EBS versions and your ATG RUP version ? This patch is included in ATG RUP5 and above. Have all of the pre-req patches listed in the readme file been applied ? What is your definition of a "long time" ?
    HTH
    Srini

  • Creation of Universe takes long time on BW Query

    Hello Gurus,
    I'm trying to create my universe on BW Query and it is taking long time to open. When I parse my objects also it atleast takes 20 minutes to parse one object. The same thing happens from WebIntelligence also. When I export this universe and create a Web Intelligence query and run the report it takes atleast 15 minutes to show the data though data is very less. Any ideas on how to improve this performance.
    Regards,
    Vijay

    Hi Ingo,
    Thank you for your comments. Is it the SAP Integration Kit FP1.6 are you talking about? If yes, then I was able to install it on the server but I don't have SAP Integration kit installed in the client system. Why would I need to install SAP Integration on client as I'm using my server CMS Name to connect to server and once it has the necessary components isn't that good enough?
    I tried creating a report and the performance did improve just by installing it on the server. But if I just pull any one object in WebI I receive the below error when answering one of the prompts
    A database error occured. The database error text is: . (WIS 10901)
    When I click on help the cause and action are as below
    Cause
    The database that provides the data to this document has generated an error. Details about the error are provided in the section of the message indicated by the field code: .
    Action
    Contact your BusinessObjects administrator with the error message information or consult the documentation provided by the supplier of the database.
    Regards,
    Vijay

  • Why update query takes  long time ?

    Hello everyone;
    My update query takes long time.  In  emp  ( self testing) just  having 2 records.
    when i issue update query , it takes long time;
    SQL> select  *  from  emp;
      EID  ENAME     EQUAL     ESALARY     ECITY    EPERK       ECONTACT_NO
          2   rose              mca                  22000   calacutta                   9999999999
          1   sona             msc                  17280    pune                          9999999999
    Elapsed: 00:00:00.05
    SQL> update emp set esalary=12000 where eid='1';
    update emp set esalary=12000 where eid='1'
    * ERROR at line 1:
    ORA-01013: user requested cancel of current operation
    Elapsed: 00:01:11.72
    SQL> update emp set esalary=15000;
    update emp set esalary=15000
      * ERROR at line 1:
    ORA-01013: user requested cancel of current operation
    Elapsed: 00:02:22.27

    Hi  BCV;
    Thanks for your reply but it doesn't provide output,  please  see   this.
    SQL> update emp set esalary=15000;
    ........... Lock already occured.
    >> trying to trace  >>
    SQL> select HOLDING_SESSION from dba_blockers;
    HOLDING_SESSION
                144
    SQL> select sid , username, event from v$session where username='HR';
    SID USERNAME     EVENT
       144   HR    SQL*Net message from client
       151   HR    enq: TX - row lock contention
       159   HR    SQL*Net message from client
    >> It  does n 't  provide  clear output about  transaction lock >>
    SQL> SELECT username, v$lock.SID, TRUNC (id1 / POWER (2, 16)) rbs,
      2  BITAND (id1, TO_NUMBER ('ffff', 'xxxx')) + 0 slot, id2 seq, lmode,
      3  request
      4  FROM v$lock, v$session
      5  WHERE v$lock.TYPE = 'TX'
      6  AND v$lock.SID = v$session.SID
      7  AND v$session.username = USER;
      no rows selected
    SQL> select MACHINE from v$session where sid = :sid;
    SP2-0552: Bind variable "SID" not declared.

  • CV04N takes long time to process select query on DRAT table

    Hello Team,
    While using CV04N to display DIR's, it takes long time to process select query on DRAT table. This query includes all the key fields. Any idea as to how to analyse this?
    Thanks and best regards,
    Bobby
    Moderator message: please read the sticky threads of this forum, there is a lot of information on what you can do.
    Edited by: Thomas Zloch on Feb 24, 2012

    Be aware that XP takes approx 1gb of your RAM leaving you with 1gb for whatever else is running. MS Outlook is also a memory hog.
    To check Virtual Memory Settings:
    Control Panel -> System
    System Properties -> Advanced Tab -> Performance Settings
    Performance Options -> Adavanced Tab - Virtual Memory section
    Virtual Memory -
    what are
    * Initial Size
    * Maximum Size
    In a presentation at one of the Hyperion conferences years ago, Mark Ostroff suggested that the initial be set to the same as Max. (Max is typically 2x physical RAM)
    These changes may provide some improvement.

  • 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.

  • 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

  • Oracle report formatting takes long time

    hi
    i am using oracle 10g Application Server 9.0.4.0.0 on Red hat linux AS 3
    oracle reports are run thru JSP's
    some reports take long time to execute though query in it if executed on sql plus are fast.
    it is fond that that formatting is going on for those reports
    what might be the reason for this??
    is the data fetched first and then formatting takes place as per data??
    waiting for reply
    Avinash

    hi
    i am using oracle 10g Application Server 9.0.4.0.0 on Red hat linux AS 3
    oracle reports are run thru JSP's
    some reports take long time to execute though query in it if executed on sql plus are fast.
    it is fond that that formatting is going on for those reports
    what might be the reason for this??
    is the data fetched first and then formatting takes place as per data??
    waiting for reply
    Avinash

  • INSERT INTO TABLE using SELECT takes long time

    Hello Friends,
    --- Oracle version 10.2.0.4.0
    --- I am trying to insert around 2.5 lakhs records in a table using INSERT ..SELECT. The insert takes long time and seems to be hung.
    --- When i try to SELECT the query fetches the rows in 10 seconds.
    --- Any clue why it is taking so much time

    vishalrs wrote:
    Hello Friends,hello
    >
    >
    --- Oracle version 10.2.0.4.0
    alright
    --- I am trying to insert around 2.5 lakhs records in a table using INSERT ..SELECT. The insert takes long time and seems to be hung.
    I don't know how a lakh is, but it sounds like a lot...
    --- When i try to SELECT the query fetches the rows in 10 seconds.
    how did you test this? and did you fetch the last record, or just the first couple of hundred.
    --- Any clue why it is taking so much timeWithout seeing anything, it's impossible to tell the reason.
    Search the forum for "When your query takes too long"

  • It takes long time to load the parameter's value when running we run report

    Hi,
    It takes long time to load the parameter's value when running we run report. What could cause this? How to troubleshoot the behavior of the report? Could I use Profile and what events should i select?
    Thanks

    Hi jori5,
    Based on my understanding, after changing the parameter, the report render very slow, right?
    In Reporting Service, the total time to generate a report include TimeDataRetreval, TimeProcessing and TimeRendering. To analyze which section take much time, we can check the table Executionlog3 in the ReportServer database. For more information, please
    refer to this article:
    More tips to improve performance of SSRS reports.
    In your scenario, since you mention the query spends less time, the delay might happens during report processing and report rendering section. So you should check Executionlog3 to check which section costs most of time, then you can refer to this article
    to optimize your report:
    Troubleshooting Reports: Report Performance.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • 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...

  • 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

  • MDX report rendering takes long time and showing Conflict Message

    Hi All,
    This is my MDX Query
    with member
    [Measures].[Rent] as
    IIF(IsEmpty([Measures].[Budget]),
    NULL, [Measures].[Rent])
    select {[Measures].[Rent]}
    on columns,
                         [Property].[Address].[All].children *
             DESCENDANTS([Account].[Account Hierarchy].[Account Group].[Expenditures],
                         [Account].[Account Tree].[Account]) *
                         [Property].[Property].[All].children
    on rows
    from
       [Master]
    When i comment [Property] Dimension member , i am able to get the result, but i need Property Dimension in MDX.
    Can anyone give some idea ?
    Thanks in advance

    Hi Jarugulalaks,
    According to your description, it take long time to render the report when using [Property] dimension, right?
    In this case, the issue can be caused by that there are too many members under this dimension. In your query, you used CrossJoin function to join multiple dimensions which might cause the performance issue. If you cross-join medium-sized or large-sized sets
    (e.g., sets that contain more than 100 items each), you can end up with a result set that contains many thousands of items—enough to seriously impair performance. You can use the NonEmptyCrossjoin function instead of Corssjoin function. For the detail
    information, please see:
    http://sqlmag.com/data-access/cross-join-performance
    http://msdn.microsoft.com/en-us/library/ms144797.aspx
    Besides, the total time to generate a reporting server report can be divided into 3 elements: Time to retrieve the data (TimeDataRetrieval); Time to process the report (TimeProcessing); Time to render the report (TimeRendering). For the detail information,
    please refer to the link below to see Charlie's reply.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/a0962b54-6fc2-4111-b8f1-a3722a65fa05/how-to-improve-performance-of-report?forum=sqlanalysisservices#a0962b54-6fc2-4111-b8f1-a3722a65fa05
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for