Query optimization..yet again...

Guys,
I need some advice yet again for tuning my query.
The query below takes hell lots of time for execution(earlier ther performance was very much appreciable).
SELECT 'B'||','||FD.GEO_ID||','||FD.PROD_ID||','||','||','||','||','||','||SUM(FACT_AMT_18-FACT_AMT_16)||','||NVL(FD.ISO_CRNCY_CODE_CHAR, 'USD')||','||FD.DUE_PERD||','||FD.MEASR_ID content
FROM AGG_FACT_605 FD
WHERE DUE_PERD = TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,-3))) + 1
AND FACT_TYPE_CODE='A8'
AND FD.PROD_ID IN (SELECT DISTINCT DSEND_ID FROM PROD_ASSOC_DNORM WHERE CTRL_PERD='20-SEP-06' AND STRCT_CODE='722' AND PARNT_ID='000000011' AND DSEND_LVL=8 )
AND FD.GEO_ID IN
(SELECT DISTINCT DSEND_ID FROM GEO_ASSOC_DNORM WHERE STRCT_CODE='705' AND CTRL_PERD='02-OCT-06' AND DSEND_LVL=6
MINUS
SELECT DISTINCT DSEND_ID FROM GEO_ASSOC_DNORM WHERE STRCT_CODE='705' AND CTRL_PERD='02-OCT-06' AND DSEND_LVL=6 AND PARNT_ID='948')
AND FD.MEASR_ID IN
('900005','900015','720000','770000','900038','900039','900031','900030')
GROUP BY FD.GEO_ID,FD.PROD_ID,FD.ISO_CRNCY_CODE_CHAR,FD.DUE_PERD,FD.MEASR_ID
ORDER BY FD.GEO_ID,FD.PROD_ID,FD.ISO_CRNCY_CODE_CHAR,FD.DUE_PERD,FD.MEASR_ID;
| Id  | Operation                   |  Name                  | Rows  | Bytes | Cost  | Pstart| Pstop |
|   0 | SELECT STATEMENT            |                        | 10546 |   628K|   377K|       |       |
|   1 |  SORT GROUP BY              |                        | 10546 |   628K|   377K|       |       |
|   2 |   HASH JOIN                 |                        |  9558K|   556M|   284K|       |       |
|   3 |    VIEW                     | VW_NSO_2               |    89 |   801 |    28 |       |       |
|   4 |     MINUS                   |                        |       |       |       |       |       |
|   5 |      SORT UNIQUE            |                        |    89 |  1869 |       |       |       |
|   6 |       PARTITION RANGE SINGLE|                        |       |       |       |   KEY |   KEY |
|   7 |        INDEX FAST FULL SCAN | GEO_ASSOC_DNORM_IDX2   |    90 |  1890 |     1 |   KEY |   KEY |
|   8 |      SORT UNIQUE            |                        |     1 |    26 |       |       |       |
|   9 |       PARTITION RANGE SINGLE|                        |       |       |       |   KEY |   KEY |
|  10 |        INDEX FAST FULL SCAN | GEO_ASSOC_DNORM_IDX3   |     1 |    26 |     1 |   KEY |   KEY |
|  11 |    HASH JOIN                |                        |  6766K|   335M|   284K|       |       |
|  12 |     VIEW                    | VW_NSO_1               |  5273 | 52730 |   235 |       |       |
|  13 |      SORT UNIQUE            |                        |  5273 |   190K|   235 |       |       |
|  14 |       PARTITION RANGE SINGLE|                        |       |       |       |   KEY |   KEY |
|  15 |        INDEX FAST FULL SCAN | PROD_ASSOC_DNORM_IDX3  |  5297 |   191K|   189 |   KEY |   KEY |
|  16 |     PARTITION RANGE ITERATOR|                        |       |       |       |     1 |     2 |
|  17 |      TABLE ACCESS FULL      | AGG_FACT_605           |    23M|   936M|   284K|     1 |     2 |
[\pre]
I beleive the problem is due to full table scan on 'AGG_FACT_605' table which contains about 1395678439 records.
If I create a partitioned table and then make use of the above query on the partioned table, what would be the best bet of column to have the partition on?
Can I've partition on combination of column values?
Any other advice to tune my query?
Help me out...
Bhagat
Message was edited by:
        Bugs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

First off you must have current stats gathered -- as has already been noted.
Beyond that there are a couple of simple things that you can do.
1) You don't need the DISTINCT clause in your sub-queries -- and it may be getting in the way of the optimizer making a bit better guesses.
2) You don't need the MINUS in your 2nd sub-query, you can use (parnt_id IS NULL OR parnt_id='948') instead.
Now if you're still seeing a full table scan on your fact table you need to ask what approach would be better than a full table scan. How selective is (i.e. what proportion of the data corresponds to) each of your predicates? In particular, how much of the data corresponds to:
1) DUE_PERD = TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,-3))) + 1
2) FACT_TYPE_CODE='A8'
3) FD.PROD_ID IN (blah)
4) FD.GEO_ID IN (stuff)
Hopefully at least one of those eliminates a significant proportion of your data such that an index can be used to retrieve only the relevant rows.

Similar Messages

  • How can I stop music and movies from being automatically deleted from my phone and saved on the cloud? I've just tried to watch a movie on my 2 hour commute, but yet AGAIN it has been removed. I do NOT want to spank all of my data allowance

    How can I stop music and movies from being automatically deleted from my phone and saved on the cloud? I've just tried to watch a movie on my 2 hour commute, but yet AGAIN it has been removed. I do NOT want to spank all of my data allowance downloading it again, especially because (believe it or not) I added it to my phone because that's precisely where I wanted it!! Any help much appreciated

    FYI I had to put this link into firefox to reply - because **** back safari just wouldn't register my clicks to any of the links on the post... Despite reloadeing and even restarting my computer. Totally annoying and a massive pain in the ***.
    But in terms of my initial query; thanks for responding. But no, this is NOT the cause of the problem. I have auto sync and sync over wifi activated, but have also selected manually manage music and videos. Plus, all of my music and videos are on my macbook, absolutely all of it, so if it my phone was syncing with my macbook everything would still be on the phone. Life would be peachy if my phone jsut copied everything that was on my macbook, but unfortuantely it keeps deleting tracks for no apparent reason.
    Any thoughts greatly welcomed, because at the moment i can only conclude that my iphone is crap.

  • ViewObject LOV query is executing again and again..

    Hi Experts,
    Currently in my application VO has one LOV component
    DeparmentVO - countryID (LOV) pointing to the CountryVO
    Where CountryVO is a query based and it depends on the user session language "Select countryID, country from Counties where language=:language
    Now application works fine, however whenever the user launched the page the countryVO query is executed again and again and it is not cached. In the DeparmentVO view accessor the is there any way we can specify the CountryVO to be taken fro cache? Or is there any configuration that we need to do inorder to run the country query only once per session?
    Looking forward you advice on this.
    Thanks

    Hi Timo,
    Our jdev version is 11.1.2.1
    We have the page which shows the department table each record has the country LOV.
    After the login the user can view the page at that time the query is executed, after that he may visit some other page and then come back to the same page then again it is executed. The CountryVO list is based on the language so it needs to be load only once per session in my case to optimize the performance.
    Thanks

  • Oracle 11g on Linux : Query Optimization issue

    Hi guru,
    I am facing one query optimization related problem in group by query
    Table (10 million Records)
    Product(ProductId number,ProductName varchar(100),CategoryId VARCHAR2(38),SubCategoryId VARCHAR2(38))
    Index
    create index idxCategory on Product (CategoryId,SubCategoryId)
    Query1:To find product count for all CategoryId and SubCategoryId
    select CategoryId,SubCategoryId,count(*) from Product group by CategoryId,SubCategoryId
    Above query is not using index idxCategory and doing table scan which is very costly.
    When I fire Query2: select count(*) from Product group by CategoryId,SubCategoryId
    then it is properly using index idxCategory and very fast.
    Even I specified hint in Query1 but it is not using hint.
    Can anybody suggest why oracle is not using index in Query1 and what should I do so that Query1 will use Index.
    Thanks in advance.

    user644199 wrote:
    I am facing one query optimization related problem in group by query
    Query1:To find product count for all CategoryId and SubCategoryId
    select CategoryId,SubCategoryId,count(*) from Product group by CategoryId,SubCategoryId
    Above query is not using index idxCategory and doing table scan which is very costly.
    When I fire Query2: select count(*) from Product group by CategoryId,SubCategoryId
    then it is properly using index idxCategory and very fast.
    Even I specified hint in Query1 but it is not using hint.
    Can anybody suggest why oracle is not using index in Query1 and what should I do so that Query1 will use Index.The most obvious reason that the table needs to be visited would be that the columns "CategoryId" / "SubCategoryId" can be NULL but then this should apply to both queries. You could try the following to check the NULL issue:
    select CategoryId,SubCategoryId,count(*) from Product where CategoryId is not null and SubCategoryId is not null group by CategoryId,SubCategoryId
    Does this query use the index?
    Can you show us the hint you've used to force the index usage and the EXPLAIN PLAN output of the two queries including the "Predicate Information" section? Use DBMS_XPLAN.DISPLAY to get a proper output, and use the \ tag before and after when posting here to format it using fixed font. Use the "Quote" button in the message editor to see how I used the \ tag here.
    Are above queries representing the actual queries used or did you omit some predicates etc. for simplicity?
    By the way, VARCHAR2(38) and ...ID as name, are these columns storing number values?
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Double up of my document folder If I click on my Documents in finder it then opens another selection of folders including yet another documents folder which if this one is clicked on the folder is repeated yet again this does not appear to be correct help

    I believe I have  a problem when opening up my documents in finder. where upon I can view all my folders but with yet another Documents folder within this group, if I then click on this second Documents folder yet again a repeat  of the do'cs  folder appears. I have tried to merge the Documents folders into one but after a morning and a few hours later having completed the merge when I reopened the folders the problem was still there. Help.
    Sandra

    Reset the PRAM
    Reinstall the operating system from the dvd (you will not loose your data)

  • What is query optimization and how to do it.

    Hi
    What is query optimization?
    Any link can any one provide me so that i can read and learn the techniques.
    Thanks
    Elias Maliackal

    THis is an excellent place to start: When your query takes too long ...

  • Reg Query Optimization - doubts..

    Hi Experts,
    This is related to Blog by Mr Prakash Darji regarding "Query Optimization" posted on Jan 26 2006.In this to optimize query Generation of Report is suggested.
    I tried this, but I am not sure I am analyzing this correctly.
    I collected Stats data before and after Generation of Report.But how to be sure that this is helping me? Did any one has tried this?
    What to look for in Stats Data - duration?
    But duration would not be absolute parameter as there is factor of "Wait Time, User", so duration may depend on this.
    Please help me in this.
    Thanks
    Gaurav
    Message was edited by: Gaurav

    Any ideas Experts?

  • Yet again connection drops !!!

    after the last fix speed was ok for a few months but now gone back to the same old **bleep**. Speed dropping to around 0.06mb having to restart modem cant do anything with broadband at all !
    ADSL Settings
    VPI/VCI:
    0/38
    Type:
    PPPoA
    Modulation:
    G.992.1 Annex A
    Latency type:
    Interleaved
    Noise margin (Down/Up):
    4.1 dB / 21.0 dB
    Line attenuation (Down/Up):
    45.6 dB / 22.5 dB
    Output power (Down/Up):
    20.4 dBm / 12.1 dBm
    FEC Events (Down/Up):
    176707827 / 443
    CRC Events (Down/Up):
    90654 / 432
    Loss of Framing (Local/Remote):
    0 / 0
    Loss of Signal (Local/Remote):
    0 / 0
    Loss of Power (Local/Remote):
    0 / 0
    HEC Events (Down/Up):
    295118 / 488
    Error Seconds (Local/Remote):
    5351 / 673

    wired and wireless, newist lappy is 1 month old the network cards in all the wireless lappys pcs are all "N" cards, even the kids wii or xbox keeps getting booted from the net, we used to have an acutal download speed of 5mb now its half of that yet again
    must of restarted it self today at some point again
    ADSL Line Status
    Connection Information
    Line state:
    Connected
    Connection time:
    0 days, 07:07:20
    Downstream:
    4.5 Mbps
    Upstream:
    448 Kbps
    ADSL Settings
    VPI/VCI:
    0/38
    Type:
    PPPoA
    Modulation:
    G.992.1 Annex A
    Latency type:
    Interleaved
    Noise margin (Down/Up):
    7.8 dB / 20.0 dB
    Line attenuation (Down/Up):
    45.7 dB / 22.5 dB
    Output power (Down/Up):
    20.0 dBm / 11.9 dBm
    FEC Events (Down/Up):
    11781936 / 31
    CRC Events (Down/Up):
    2250 / 29
    Loss of Framing (Local/Remote):
    0 / 0
    Loss of Signal (Local/Remote):
    0 / 0
    Loss of Power (Local/Remote):
    0 / 0
    HEC Events (Down/Up):
    54586 / 29
    Error Seconds (Local/Remote):
    2399 / 24
    Connection Information
    Line state:
    Connected
    Connection time:
    0 days, 07:07:59
    Downstream:
    4.5 Mbps
    Upstream:
    448 Kbps

  • OBIEE 11.1.1.7-Ago Function Error-[nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp

    Hi All,
    I was performing the steps mentioned in Oracle Tutorial"http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/biadmin11g_02/biadmin11g.htm#t10"-BI RPD creation.
    After Using the AGO function data in the Time series metric(Month Ago Revenue) was null always. I updated the DB features in RPD physical layers by selecting support for time series functions.
    After that report started to fail with below error. Please let me know if its a bug and any option to fix it.
    Thanks,
    Sreekanth
    Error
    View Display Error
    Odbc driver returned an error (SQLExecDirectW). 
      Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P 
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp, line 1680. (HY000) 
    SQL Issued: SELECT 0 s_0, "Sample Sales"."Time"."Year-L1" s_1, "Sample Sales"."Revenue"."Ago-Year Revenue" s_2, "Sample Sales"."Revenue"."Revenue" s_3 FROM "Sample Sales" FETCH FIRST 65001 ROWS ONLY
      Refresh

    I know that there is no relation between "SampleApp Lite"."D3 Orders (Facts Attributes)"."Order Date", "SampleApp Lite"."D0 Time"."Calendar Date", it's also the same thing in my own RPD.
    But as it's working with the 11.1.1.6.2 BP1 version I don't understand why it's not working with 11.1.1.6.9.
    Implicit fact column is not set on my repository, but I don't have any request with only dimensional column, so if my understanding is correct I don't need to use it. Also, the problem appears during the check of the repository not in answers.
    thanks anyway

  • Screen resolution yet again

    Although this forum has taught me a lot about screen
    resolutions, view ports
    etc. I am still struggling.
    I am on a broadscreen laptop with screen resolution 1440 x
    900 - at the moment
    perhaps uncommon, but possibly gaining popularity.
    I have a relativeley positioned div containing an absoluteley
    positioned div,
    that has an image in it, all in a table with fixed width.
    The image in the absolute pos. div shifts as I change the
    view port. Why is
    that? I would expect it to always sit the specified px's away
    from the
    container div.
    http://www.spinsister.nl/blog/index.php
    , I am talking about the two pictures
    in the entry 'Vanuit de verte', at the moment at the top of
    the page.)
    Sorry to have to ask about this yet again. I read Nadia's
    article several times
    and thought I understood, but obviously don't.
    Regards,
    Adriana.
    [ put out the rubbish if you need to reach me by e-mail ]
    www.spinsister.nl

    Anyhow, you need a) to validate the page, and b) to put a
    valid and complete
    doctype on it so that you get out of quirks mode.
    </tr>
    <tr>
    <td bgcolor="#ffffff"><table width="770">
    <tr>
    <td valign="top" bgcolor="#ffffff"><div
    id="entryview">
    This is clearly invalid code, as is this -
    </tr>
    </tr>
    Also, you have HTML in your CSS files (there should only be
    CSS in CSS
    files) -
    <style type="text/css">
    I see what you are experiencing, and my experience tells me
    that something
    on the page is working in ways that you don't expect.
    Personally, I
    wouldn't use a table-based layout at all, but I realize you
    are already
    committed to it. Also, try adding borders to this rule -
    .gallerycontainer{
    position: relative;
    /*Add a height attribute and set to largest image's height to
    prevent
    overlaying*/
    and you'll see that it's not being expressed at all. That's
    likely the
    source of your problem.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "A.Translator" <[email protected]> wrote in
    message
    news:[email protected]...
    >> Seems to me that those two images are doing exactly
    what you want them to
    >> do (IE6 and FF1.5x). They retain their relative
    position on any browser
    >> viewport width.
    >
    > Not on any, at least not the way I understand view
    ports.
    > To illustrate my question I put two screen shots online
    >
    http://www.xs4all.nl/~hogen/voorbeeld/
    >
    > In both shots I hover over the thumb to expose the
    larger image to the
    > right. In the top one the off set works as intended -
    notice: on the left
    > FF's Webdeverloper's Toolbar CSS editor is open making
    the viewport
    > smaller.
    >
    > The screen shot underneath shows the same, but now in
    full screen.
    >
    > Sorry for the horizontal scroll bar that you'll probably
    get but you
    > appreciate in this case I had to keep the images full
    size.
    >
    > --
    > Regards,
    > Adriana.
    > [ put out the rubbish if you need to reach me by e-mail
    > www.spinsister.nl
    >
    >

  • SQL Server 2008R2 SP2 Query optimizer memory leak ?

    It looks like we are facing a SQL Server 2008R2 queery optimizer memory leak.
    We have below version of SQL Server
    Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
     Jun 28 2012 08:36:30
     Copyright (c) Microsoft Corporation
     Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    The instance is set MAximum memory tro 20 GB.
    After executing a huge query (2277 kB generated by IBM SPSS Clementine) with tons of CASE and a lot of AND/OR statements in the WHERE and CASE statements and muliple subqueries the server stops responding on Out of memory in the internal pool
    and the query optimizer has allocated all the memory.
    From Management Data Warehouse we can find that the query was executed at
    7.11.2014 22:40:57
    Then at 1:22:48 we recieve FAIL_PACE_ALLOCATION 1
    2014-11-08 01:22:48.70 spid75       Failed allocate pages: FAIL_PAGE_ALLOCATION 1
    And then tons of below errors
    2014-11-08 01:24:02.22 spid87      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:02.22 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:02.22 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:02.30 Server      Error: 17312, Severity: 16, State: 1.
    2014-11-08 01:24:02.30 Server      SQL Server is terminating a system or background task Fulltext Host Controller Timer Task due to errors in starting up the task (setup state 1).
    2014-11-08 01:24:02.22 spid74      Error: 701, Severity: 17, State: 123.
    2014-11-08 01:24:02.22 spid74      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:13.22 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:13.22 spid87      Error: 701, Severity: 17, State: 123.
    2014-11-08 01:24:13.22 spid87      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:13.22 spid63      Error: 701, Severity: 17, State: 130.
    2014-11-08 01:24:13.22 spid63      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:13.22 spid57      Error: 701, Severity: 17, State: 123.
    2014-11-08 01:24:13.22 spid57      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:13.22 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:18.26 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:24.43 spid81      Error: 701, Severity: 17, State: 123.
    2014-11-08 01:24:24.43 spid81      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:18.25 Server      Error: 18052, Severity: -1, State: 0. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:18.25 Server      BRKR TASK: Operating system error Exception 0x1 encountered.
    2014-11-08 01:24:30.11 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:30.11 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:35.18 spid57      Error: 701, Severity: 17, State: 131.
    2014-11-08 01:24:35.18 spid57      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:35.18 spid71      Error: 701, Severity: 17, State: 193.
    2014-11-08 01:24:35.18 spid71      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:35.18 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:35.41 Server      Error: 17312, Severity: 16, State: 1.
    2014-11-08 01:24:35.41 Server      SQL Server is terminating a system or background task SSB Task due to errors in starting up the task (setup state 1).
    2014-11-08 01:24:35.71 Server      Error: 17053, Severity: 16, State: 1.
    2014-11-08 01:24:35.71 Server      BRKR TASK: Operating system error Exception 0x1 encountered.
    2014-11-08 01:24:35.71 spid73      Error: 701, Severity: 17, State: 123.
    2014-11-08 01:24:35.71 spid73      There is insufficient system memory in resource pool 'internal' to run this query.
    2014-11-08 01:24:46.30 Server      Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:51.31 Server      Error: 17053, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:51.31 Server      Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    2014-11-08 01:24:51.31 Logon       Error: 18052, Severity: -1, State: 0. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
    Last error message is half an hour after the inital Out of memory at 2014-11-08 01:52:54.03. Then the Instance is completely shut down
    From the memory information in the error log we can see that all the memory is consumed by the QUERY_OPTIMIZER
    Buffer Pool                                   Value
    Committed                                   2621440
    Target                                      2621440
    Database                                     130726
    Dirty                                          3682
    In IO                                            
    0
    Latched                                          
    1
    Free                                           
    346
    Stolen                                      2490368
    Reserved                                          0
    Visible                                     2621440
    Stolen Potential                                  0
    Limiting Factor                                  17
    Last OOM Factor                                   0
    Last OS Error                                     0
    Page Life Expectancy                             28
    2014-11-08 01:22:48.90 spid75     
    Process/System Counts                         Value
    Available Physical Memory                29361627136
    Available Virtual Memory                 8691842715648
    Available Paging File                    51593969664
    Working Set                               628932608
    Percent of Committed Memory in WS               100
    Page Faults                                48955000
    System physical memory high                       1
    System physical memory low                        0
    Process physical memory low                       1
    Process virtual memory low                        0
    MEMORYCLERK_SQLOPTIMIZER (node 1)                KB
    VM Reserved                                       0
    VM Committed                                      0
    Locked Pages Allocated                            0
    SM Reserved                                       0
    SM Committed                                      0
    SinglePage Allocator                       19419712
    MultiPage Allocator                             128
    Memory Manager                                   KB
    VM Reserved                               100960236
    VM Committed                                 277664
    Locked Pages Allocated                     21483904
    Reserved Memory                                1024
    Reserved Memory In Use                            0
    On the other side MDW reports that the MEMORYCLERK_SQLOPTIMIZER increases since the execution of the query up to the point of OUTOF MEMORY, but the Average value is 54.7 MB during that period as can be seen on attached graph.
    We have encountered this issue already two times (every time the critical query is executed).

    Hi,
    This does seems to me kind of memory Leak and actually it is from SQL Optimizer which leaked memory from buffer pool so much that it did not had any memory to be allocated for new page.
    MEMORYCLERK_SQLOPTIMIZER (node 1)                KB
    VM Reserved                                       0
    VM Committed                                      0
    Locked Pages Allocated                            0
    SM Reserved                                       0
    SM Committed                                      0
    SinglePage Allocator                       19419712
    MultiPage Allocator                             128
    Can you post complete DBCC MEMORYSTATUS output which was generated in errorlog. Is this the only message in errorlog or there are some more messages before and after it.
    select (SUM(single_pages_kb)*1024)/8192 as total_stolen_pages, type
    from sys.dm_os_memory_clerks
    group by typeorder by total_stolen_pages desc
    and
    select sum(pages_allocated_count * page_size_in_bytes)/1024,type from sys.dm_os_memory_objects
    group by type
    If you can post the output of above two queries with dbcc memorystaus output on some shared drive and share location with us here. I would try to find out what is leaking memory.
    You can very well apply SQL Server 2008 r2 SP3 and see if this issue subsides but I am not sure whether this is fixed or actually it is a bug.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • How to do query Optimization ,plz share any documents with real examples

    Hi All,
    could any one please provide me some informations, how can i do query optimization in oracle using Third party tool sql developer .
    i am working oracle 10g version,please share with me if any documents or ppt like that.
    Thanks
    Krupa

    879534 wrote:
    Hi All,
    could any one please provide me some informations, how can i do query optimization in oracle using Third party tool sql developer .SQL Developer is Oracle's development tool, not a third party tool.
    Questions about using SQL Developer should go in the SQL Developer forum:
    SQL Developer
    I'll move the question there for you.

  • Quicktime stealing file associations yet again

    I just want to say how fed up I am of Quicktime. It has been stealing file associations for years now, and everytime it happens I have to find out how to get them back again to the way I want it - and yet again, the 'changes' seem to have no effect. What is WRONG with Apple? It seems they are belligerently determined to mess with my time and I really have had enough of it.
    OK, any help please:
    Quicktime version 7.6.9, Windows Vista.
    I would like to be able to click on a .wav extension or a .mp3 extension and have it open in windows mediaplayer, NOT in a hijacked Quicktime web page that prevents me from clicking through to anything else.
    I have tried the following:
    Edit\Preferences\Quicktime Preferences\Browser\Filetypes...Mime Settings - cannot uncheck associations with Quicktime! (way to be a *******, Apple!), the settings on wav and mp3 still showed Windows mediaplayer
    Checked also the 'default programs' application in Vista itself. all looks in order there too.
    Apple *****.

    Re Tracer -- did this work for you? I have the same problem, but when I disable the QuickTime add-ons in Internet Explorer (one of the numerous attempted "fixes" I've tried), the only result is a QuickTime window still opens, but will not play the movie clip. This has not restored my ability to use Windows Media Player to view mpeg files.
    I don't know if it makes a difference, but my OS is Windows 7, and I'm using the latest version of Internet Explorer (10, I think -- I'm not at my own computer)
    If you were able to fix this annoying problem, could you please post your solution (assuming it's not the one suggested by pmarangoni, which as indicated above, didn't work for me)

  • I have Adobe Acrobat installed as part of the CS6 suite.  It has stopped working (yet again -- it has done that three of four times over the last year).  I have spent days trying to repair it; etc. without any success.  The last time this happened, it was

    I have Adobe Acrobat installed as part of the CS6 suite.
    It has stopped working (yet again -- it has done that three of four times over the last year).
    I have spent days trying to repair it; etc. without any success.
    The last time this happened, it was necessary for someone from Adobe to reinstall it entirely, if I remember correctly.
    I give up. Can anyone tell me what I must do get the program to actually work?
    I spend more time trying to get Adobe Acrobat to work, than I do actually doing my work.
    My OS is Windows 8.1.  My system has 16 MB of RAM, and hard disks are not overfilled.
    I run update virus checker (Kaspersky) daily.
    Cheers,
    Hugh

    Hi Hugh ,
    Could you please tell what are the challenges you are facing while trying to access Acrobat ?
    Do you get any error message ?If yes ,please share the screen shot of the same.
    Please try the solution outlined here: http://helpx.adobe.com/creative-suite/kb/acrobat-failed-launch-30-days.html
    OR
    Try repairing it from Control panel, or try launching it with a different user account and check if it works or not.
    Install the latest updates for Acrobat X from the link : http://www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows
    and check.
    Let us know how it goes,
    Regards
    Sukrit Dhingra

  • Does The Query get Fired Again

    Does the query get fired again when i query a existing view
    1. create view abc as select name from Table
    2. select name from abc
    Table is a really large table wid many columns and many rows
    Lookin for a better performance coz i need names in one procedure and again need the same names for deletion in another procedure
    I dont want to fire the same query twice dats y.

    > there are like 20000 rows out of wch i need 2 retrieve 9000 or 10000 rows dependin on
    the constraints
    Go slow on the I'M SPEAK please... much better to deal with technical issues when using proper English.
    A 20,000 rows table is tiny and running a SQL that returns 10,000 or so rows, should be execute in seconds.. the slowest part of the operation should be shipping that 10,000 rows to the client (across the network) in case of a remote client.
    Maybe if you can describe the physical structure of the table (heap, index, partitioned?) and pinpoint just where the performance problem is (execution plan or an SQL*Plus autotrace), we could comment on why the performance seems (or maybe truly is) slow.

Maybe you are looking for