Query running forever

Hi ,
When i am running  query it is running forever  and i am not able to get the results.  But , iam able to get the results by using the LISTCUBE transaction very fastly for the same selection criteria.
When I observed in SM66 , The work process is always trying to Read the table /bic/03035
appreciate your suggessions and valuble solutions

Hi,
I had the same problem yesterday  - the only difference was that SM66 showed a different table name.
My problem was solved by getting the Database team to analyze that particular table. The DB logs showed that the table had been Analyzed a long time back. By getting the table analyzed the execution time for the query was cut down from 15 minutes to 30 seconds.
See if this helps in your scenario as well. The table name that you have given does not appear to be the full table name - enable long text in SM66 to display the table name in full and ask you DB team to check when that table was last analyzed - if it was a long time back then get then to analyze it again and see if it improves the query performance.
Hope it helps,
Regards,
Nikhil

Similar Messages

  • Query runs forever when using selection on line item dim

    we have a cube zcube which has po number as a line item dimension .
    everymonth users run queries this cube using po number as selection
    criterai and using a wild card search on this field . every time
    queries have run fine . however , this month when we try to do so
    the query runs forever and no results are returned . i also tried
    listcubing with similar selection but it also did not return any results .
    our production system has lot of data . i tried in test system it worked fine
    i checked the cube for compression and indices in production , they look fine
    can anyone think of anything that could have gone wrong ? also did rsrv tests ..
    but all come green
    we have not done any developments on this cube , however we have shifted to
    a new hardware in the past month . can anyone think of any reasons ?
    anything that can help me catch the issue ? all suggestions welcome

    Not sure,
    Are you saying that you need both the counts seperately? or a combined count?
    how are you joining alpha and beta tables? what is the join condition?
    you need to do something like this,
    SELECT COUNT(CASE WHEN
                        (A.col1 = 'Pete' AND SUBSTR(A.col2,,1,12)=SUBSTR(B.col2,,1,13))
                     OR ( A.col1 != 'Pete' AND SUBSTR(A.col2,,1,15)=SUBSTR(B.col2,,1,15))
                    THEN 1 ELSE 0
                 END)
    FROM alpha A, beta b
    WHERE alpha.join_cloumn= beta.join_columnG.

  • Query running forever..please help ?

    I am running the following query on my Oracle 10g db.
    select count(*) from port p where p.ne not in (Select distinct  ne from network);The table port has 9 million records and the subquery Select distinct  ne from network returns 85K records.
    I need to get the result but for some reason the query is running for a long time without giving the result.
    Can i Correct/Optimize this query for faster results.
    Note : ne column is the Fkey in port table
    Help highy appreciated.
    thx

    user8651741 wrote:
    If you are just trying to find records in port without a corresponding record in network you could try something like
    select ne from port
    minus
    select distinct ne from network;I tried the query but its doing the same thing running endlessly
    The Explain for this query gave
    PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                                                                           
    | Id  | Operation              | Name         | Rows  | Bytes | Cost  |                                                                                                                                                                                                                                     
    |   0 | SELECT STATEMENT       |              |  9854K|   142M|   167K|                                                                                                                                                                                                                                     
    |   1 |  MINUS                 |              |       |       |       |                                                                                                                                                                                                                                     
    |   2 |   SORT UNIQUE          |              |  9854K|   140M|   167K|                                                                                                                                                                                                                                     
    |   3 |    TABLE ACCESS FULL   | PORT      |  9854K|   140M|   115K|                                                                                                                                                                                                                                     
    |   4 |   SORT UNIQUE          |              | 85491 |  1586K|   583 |                                                                                                                                                                                                                                     
    |   5 |    INDEX FAST FULL SCAN| SYS_C0037316 | 85491 |  1586K|    70 |                                                                                                                                                                                                                                     
    Note                                                                                                                                                                                                                                                                                                        
       - 'PLAN_TABLE' is old version   

  • Query runs for ever

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

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

  • Datawarehouse job run forever and powershell doesn't allow to enable

    It seems that my datawarehouse jobs was running forever without any report producing. I check the jobs enabled and it tell "no" every job except MPSyncJob. Every job status is running as "running" or "not started". I tried to enable the datawarehouse jobs
    by powershell cmdlets. When I ran Get-SCDWJob or Enable-SCDWJob the error always appear as following.
    Get-SCDWJob : Parse error before eof
    At line:1 char:12
    + get-scdwjob <<<<
        + CategoryInfo          : OperationStopped: (SCSMMAIN:DataWarehouseManagem
       entGroup) [Get-SCDWJob], QueryGrammarException
        + FullyQualifiedErrorId : Unable to retrieve job list,Microsoft.Enterprise
       Management.Warehouse.Cmdlets.GetSCDWJob
    In the event viewer showed this detail
    Log Name:      Operations Manager
    Source:        OpsMgr SDK Service
    Date:          6/27/2012 11:15:01 AM
    Event ID:      26319
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      SCSMMAIN.scsm.vm
    Description:
    An exception was thrown while processing GetDataWarehouseOrchestrationJobs for session ID uuid:6513011d-4b46-42f1-a2cc-c28836851029;id=17.
     Exception message: Parse error before eof
     Full Exception: Microsoft.EnterpriseManagement.Common.QueryGrammarException: Parse error before eof
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.QueryGrammarYaccClass.error(Int32 q_state, SSLexLexeme q_look)
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.SSVParseLib.SSYacc.doError()
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.SSVParseLib.SSYacc.parse()
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.QueryGrammarParser.GetCriteriaXml(String query)
       at Microsoft.EnterpriseManagement.ServiceDataLayer.DataWarehouseJobService.GetDataWarehouseOrchestrationJobs(String criteria, Int32 numberOfBatches)
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="OpsMgr SDK Service" />
        <EventID Qualifiers="49152">26319</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2012-06-27T04:15:01.000000000Z" />
        <EventRecordID>2139</EventRecordID>
        <Channel>Operations Manager</Channel>
        <Computer>SCSMMAIN.scsm.vm</Computer>
        <Security />
      </System>
      <EventData>
        <Data>GetDataWarehouseOrchestrationJobs</Data>
        <Data>uuid:6513011d-4b46-42f1-a2cc-c28836851029;id=17</Data>
        <Data>Parse error before eof</Data>
        <Data>Microsoft.EnterpriseManagement.Common.QueryGrammarException: Parse error before eof
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.QueryGrammarYaccClass.error(Int32 q_state, SSLexLexeme q_look)
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.SSVParseLib.SSYacc.doError()
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.SSVParseLib.SSYacc.parse()
       at Microsoft.EnterpriseManagement.Mom.QueryGrammar.QueryGrammarParser.GetCriteriaXml(String query)
       at Microsoft.EnterpriseManagement.ServiceDataLayer.DataWarehouseJobService.GetDataWarehouseOrchestrationJobs(String criteria, Int32 numberOfBatches)</Data>
      </EventData>
    </Event>
    Any suggestion? I stuck at here for one week now.

    I have the same problem with the parser error before eof and unable to retrieve job list but when i try:
    get-scdwjob -jobname dwmaintenance -computername MySmServer -dwserver MyDwServer
    I get:
    A parameter cannot be found that matches parameter name 'dwserver'
    I have a feeling that something needs an update and/or is mismatched but I don't know what or where to start.

  • Query running too long on a partitioned table

    Hello,
    I'm trying to run the following query on a 73 million row table, but the query keeps running and running without returning any result within a reasonable amount of time.
    select *
    from svcdepot.service_log l
    where dbms_lob.instr(l.service_log, 'SALESFORCE_ROLE_CREATED') > 0 and rownum < 2
    and create_date > sysdate - .1
    this table has a normal index on the create_date table and is also partitioned on create_date. The partition names are like PARTITION20120316 and PARTITION20120311. It says values less than TIMESTAMP' 2012-03-16 00:00:00' and TIMESTAMP' 2012-03-11 00:00:00', respectively. Could someone please tell me how I can modify the query so that it doesn't run forever? It seems to struggle against the create_date column (while I was troubleshooting). I just need one record with that SALESFORCE_ROLE_CREATED text in that clob column.
    Thanks!

    arizona9952 wrote:
    Hello,
    I'm trying to run the following query on a 73 million row table, but the query keeps running and running without returning any result within a reasonable amount of time.
    select *
    from svcdepot.service_log l
    where dbms_lob.instr(l.service_log, 'SALESFORCE_ROLE_CREATED') > 0 and rownum < 2
    and create_date > sysdate - .1
    this table has a normal index on the create_date table and is also partitioned on create_date. The partition names are like PARTITION20120316 and PARTITION20120311. It says values less than TIMESTAMP' 2012-03-16 00:00:00' and TIMESTAMP' 2012-03-11 00:00:00', respectively. Could someone please tell me how I can modify the query so that it doesn't run forever? It seems to struggle against the create_date column (while I was troubleshooting). I just need one record with that SALESFORCE_ROLE_CREATED text in that clob column.
    Thanks!Thread: HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting

  • Query runs fine in 9i but results to ORA-01652 unable to extend temp in 10g

    Hi,
    We are having issues in running a SQL query in 10g. In 9i, it runs fine with no problems but when run in 10g, It takes forever and the temp tablespace grows very large upto 60GB until we get ORA-01652 error due to lack of disk space. This does not occur in 9i, where query runs in only 20 mins and does not take up temp that big. 9i version is 9.2.0.8. 10g is 10.2.0.3

    Heres the SQL query:
    SELECT
    J2.EMPLID,
    TO_CHAR(J2.EFFDT,'YYYY-MM-DD'),
    J2.EFFSEQ,
    J2."ACTION",
    J2.ACTION_REASON,
    TO_CHAR(J2.GRADE_ENTRY_DT,'YYYY-MM-DD'),
    J2.COMPRATE,
    J2.CHANGE_AMT,
    J2.COMP_FREQUENCY,
    J2.STD_HOURS,
    J2.JOBCODE,
    J2.GRADE,
    J2.PAYGROUP,
    PN2.NATIONAL_ID,
    TO_CHAR(PC.CHECK_DT,'YYYY-MM-DD'),
    SUM(PO.OTH_EARNS),
    To_CHAR(SUM(PO.OTH_EARNS)),
    PO.ERNCD,
    '3',
    TO_CHAR(PC.PAY_END_DT,'YYYY-MM-DD'),
    PC.PAYCHECK_NBR
    FROM PS_JOB J2,
    PS_PERS_NID PN2,
    PS_PAY_OTH_EARNS PO,
    PS_PAY_CHECK PC
    WHERE J2.EMPL_RCD = 0
    AND PN2.EMPLID = J2.EMPLID
    AND PN2.COUNTRY = 'USA'
    AND PN2.NATIONAL_ID_TYPE = 'PR'
    AND J2.COMPANY <> '900'
    AND J2.EFFDT <= SYSDATE
    AND PC.EMPLID = J2.EMPLID
    AND PC.COMPANY = PO.COMPANY
    AND PC.PAYGROUP = PO.PAYGROUP
    AND PC.PAY_END_DT = PO.PAY_END_DT
    AND PC.OFF_CYCLE = PO.OFF_CYCLE
    AND PC.PAGE_NUM = PO.PAGE_NUM
    AND PC.LINE_NUM = PO.LINE_NUM
    AND PC.SEPCHK = PO.SEPCHK
    AND EXISTS (SELECT ERNCD
    FROM PS_P1_CMP_ERNCD P1_CMP
    WHERE P1_CMP.ERNCD = PO.ERNCD AND EFF_STATUS = 'A')
    GROUP BY J2.EMPLID,
    J2.EFFDT,
    J2.EFFSEQ,
    J2.ACTION,
    J2.ACTION_REASON,
    J2.GRADE_ENTRY_DT,
    J2.COMPRATE,
    J2.CHANGE_AMT,
    J2.COMP_FREQUENCY,
    J2.STD_HOURS,
    J2.JOBCODE,
    J2.GRADE,
    J2.PAYGROUP,
    PN2.NATIONAL_ID,
    PC.CHECK_DT,
    PO.ERNCD,
    '3',
    PC.PAY_END_DT,
    PC.PAYCHECK_NBR

  • Query running slow when using case inside when

    Hi All,
    I am in the process of creating a query as per the following conditions:
    select count(*) from Alpha A, Beta B
    where
    (case
    when
    A.col1='Pete' and substr(A.col2,1,12)=substr(B.col2,1,12)
    then 1
    else
    -- for all other cases when A.col1 is not equal to 'Pete', substr 1-15 needs to be checked on A and B
    when A.col1 != 'Pete' and substr(A.col2,1,15)=substr(B.col2,1,15)
    then 1
    else 0
    end)=1
    When i run the whole query together, it continues to run forever and i have to eventually kill it. However, when i run the 2 WHEN clauses seperately, it runs within a second and fetches me the correct data. What goes wrong while merging these two inside 2 WHEN clauses that it causes the query to drag?
    Please advise.
    Thanks in advance.

    Not sure,
    Are you saying that you need both the counts seperately? or a combined count?
    how are you joining alpha and beta tables? what is the join condition?
    you need to do something like this,
    SELECT COUNT(CASE WHEN
                        (A.col1 = 'Pete' AND SUBSTR(A.col2,,1,12)=SUBSTR(B.col2,,1,13))
                     OR ( A.col1 != 'Pete' AND SUBSTR(A.col2,,1,15)=SUBSTR(B.col2,,1,15))
                    THEN 1 ELSE 0
                 END)
    FROM alpha A, beta b
    WHERE alpha.join_cloumn= beta.join_columnG.

  • 0FISCPER - F4 never loads and runs forever

    Hi All,
    I am facing some sporadic issues with the 0FISCPER F4 option. Every time I select the F4 of the fiscal period it runs forever and I never get back any results. Now this query is on an ODS and the same 0FISCPER seems to be fine on another ODS or InfoCube.
    Has anyone else faced this problem before, would appreciate any help and will award points.
    Thanks,
    Rahul

    Hi,
    Go to transaction rsa1 and search for a ODS where you know it's ok.
    Double-click in it.
    Right-click over 0FISCPER there and select choose specific properties.
    Do the same with the ODS where it's not working.
    Compare both and if different change it to be the same.
    But if not, try to change to ODS where it's not working for value M - Master data element.
    This will make it faster when pressing f4
    Diogo.

  • Itunes fails to recognize my phone and wants me to load as 'new phone' each time I hook up. I have disabled firewalls and it will recognize one out of five times. It also attempts to sync but just runs forever,  then gives error message 0xE8004006

    Itunes does not recognize Iphone. It asks me to restore or add as new phone each time I sign on. It then attempts to sync, just runs forever. After five tries, it allowed me to upgrade OS, but still refused to complete a sync. I have disabled firewalls. Error message 0xE8004006
    Thanks

    https://discussions.apple.com/thread/2482232?start=0&tstart=0

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

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

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

  • What are the ways to make Query run fast?

    Hi Experts,
    When a query runs slow, we generally go for creating an aggregate. My doubt is - what other things can be done to make a query run faster before creating an aggregate? What is the thumb rule to be carried out for creating an aggregate?
    Regards,
    Shreeem

    Hi Shreem,
    If you keep Query simple not complicate it with runtime calculations , it would be smooth. However as per business requirements we will have to go for it anyways mostly.
    regarding aggregates:
    Please do not use the standard proposal , it will give you hundreds based on std. rules , which consumes lots of space and adds up to load times. If you have users already using the Query and you are planning to tune it  then go for the statistics tables:
    1.RSDDSTAT_OLAP    find the query with long runtimes  get the Stepuid
    2. RSDDSTAT_DM
    3. RSDDSTATAGGRDEF  - use the stepuid above to see which aggregate is necessary for which cube.
    Another way to check ; check the users as in 1 to find the highest runtime users and find the last used bookmarks by user thru RSZWBOOKMARK for this query and check if the time matches and create the aggregates as in 3 above.
    You can also Use Transaction RSRT > execute & debug  (display stats ) - to create generic aggregates to support navigations for New queries and later refine as above.
    Hope it helps .
    Thnks
    Ram

  • Select query running long time

    Hi,
    DB version : 10g
    platform : sunos
    My select sql query running long time (more than 20hrs) .Still running .
    Is there any way to find sql query completion time approximately. (Pending time)
    Also is there any possibilities to increase the speed of sql query (already running) like adding hints.
    Please help me on this .
    Thanks

    Hi Sathish thanks for your reply,
    I have already checked in V$SESSION_LONGOPS .But it's showing TIME_REMAINING -->0
    select TOTALWORK,SOFAR,START_TIME,TIME_REMAINING from V$SESSION_LONGOPS where SID='10'
    TOTALWORK      SOFAR START_TIME      TIME_REMAINING
         1099759    1099759 27-JAN-11                    0Any idea ?
    Thanks.

  • Is it recommended to keep my Mac running forever?

    Good night,
    I would like to keep my Mac Mini running forever; all day and night.
    What are the pros and cons?
    Regards,
    Stef Heck

    Thank you for the reaction. But is it recommended? Is it safe to keep it powered all night? It's a minimal consumption right?
    I hope to get more details.
    Thank you.

  • ITunes sync with Outlook 2013 preparing to sync runs forever

    iTunes sync with Outlook 2013 preparing to sync runs forever, what is the problem?

    I have updated addresses and names in the iPhone. When I sync with Outlook it takes the updated name portion, but does not pick up the address from the iPhone. The Whitepages app (pretty handy app) will update my iPhone contact list, but I cannot then transfer that information over to my Outlook contact list. This all needs to work together. Solutions?

Maybe you are looking for

  • Problem configuring CAF / GP on NWDI

    Hi expert, I am newbie in using CAF and JDI. Currently I required to configure CAF / GP on NWDI and I have followed the steps recommended in "Installation Cookbook - Configure CAF / FP on NWDI 7.00". I have also download the archives as listed below

  • Font does not display correctly...

    When setting my default language to 'Vietnamese', I cannot get Google and Gmail pages to load up correctly; boxes appear where the font is unknown. I have tested this on the latest Safari, OmniWeb, Firefox and on 2 other iMacs both running Tiger with

  • Posting period 006 2011 is not open

    Hi Experts, We have a requirement wherein we want to skip this error message. We do not want to post to Finance as we are going live with a new system and posting will be done manually. All we need is creation of posting document. This is the reason

  • The material loss in the process of formulation,How to get its components tree in LIO construction tab ?

    A material used in formulation, and it will be lost in the process. but the material and its component need to be showed in the statement of LIO. Can it be showed by tree in the LIO Construction as other materials that not be lost? Thanks

  • BBP_MON_SC - Disable ability to Delete

    Hello Community, We would be interested in making the BBP_MON_SC tool available to several users, however, we do not what to give them the ability to delete the shopping carts. Can someone tell me if you have disabled this functionality, and how you