Estimated 55.7/18 - Actual 12.7/8

Hi
I just got BT infinity installed today.  The engineer said I had a lot of noise on the line, but that it would be fine.  When I signed up for BT infinity, the estimated speed was 55.7Mb down, 18Mb up.
I conducted some tests over an ethernet cable.  From speedtest.net I'm getting:
Download Speed (Mbps): 12.67
Upload Speed (Mbps): 7.78
Ping Latency(ms): 12
http://www.speedtest.net/my-result/2890627734
And from http://speedtest.btwholesale.com/ I'm getting:
Download Speed (Mbps): 11.48
Upload Speed (Mbps): 7.21
Ping Latency(ms): 25.63
Is there anything that I can do to get my speed closer to the estimated?
Thanks
Peter

sjtp wrote:
If the phone is dead it is unusual for the broadband to work.  Sometimes if only one wire connects the broadband can work slowly and the phone not at all.  So maybe that is what has happened in your case, in which case the broadband may well improve when the phone is fixed.  If there is audible noise on the line, the person who fixes the not working should fix that too.  If there is high frequency noise that is sometimes more difficult to persuade them to fix.
Interesting - my broadband was dropping in and out yesterday.  When I complained to BT Technical Support they said it was because my line was not transferred.  When I called this morning to complain and they said my line was DOA, I pointed out that my broadband was working - he said that fibre doesn't run on my phone line and the two are independent.
sjtp wrote:
Clearly the FTTC installer did a very rubbish job; did you notice if he was 'real' Openreach or contractor such as Quinns or Kellys?
I was a bit frazzled yesterday as we had electrics fixed, new oven installed - I'm 99% sure he was wearing an openreach T-Shirt - not sure how else to tell? He parked down the street so I didn't see his van.
He was running very late and complained that he had to fix the wiring to the master socket within our house. He just wanted to get out the door.

Similar Messages

  • Wrong estimation of ROWS and COST

    Oracle Version : 11.2.0.7
    Below plan is estimating cost as 0 and rows as 1, all the tables are having statistics on them.
    Could any one help me in finding the reason for wrong estimation of Cost and Rows .
    select           BIT.BIT_id as BITId,
              BIT.BIT_tp as BITType,
              BIT.rgs_cd as rgsCd,
              BIT.source_priority as sourcePriority,
              BIT.grp as grp,
              BIT.prd_item_id as prdItemId,
              BIT.prt_dt as printDate,
              BIT.partition_key as partitionKey,
              BIT.guid,
              BIT.image_guid,
              BIT.full_pub_fl ,
              monument.doc_tp as monumentType
    from           BIT ,
              monument,
              abbba_BIT,
              drag,
              soft_INDEX
    where
              BIT.group_id in (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25)
              and BIT.partition_key = :26
              and BIT.BIT_id=monument.BIT_id (+)
              and BIT.BIT_id=abbba_BIT.abbba_BIT_ID
              and BIT.partition_key=abbba_BIT.partition_key
              and abbba_BIT.abbba_BIT_ID=drag.abbba_BIT_ID (+)
              and BIT.BIT_id=soft_INDEX.BIT_id
              and BIT.partition_key=soft_INDEX.partition_key
              and soft_INDEX.partition_key = :28
              and abbba_BIT.partition_key = :27
              and drag.drag_NO in (:29, :30, :31, :32, :33)
              and BIT.del_fl = :34
    order by NLSsoft(soft_INDEX.INDEX_QRY_NUM, 'NLS_soft = binary'),
              BIT.source_priority,
              NLSsoft(soft_INDEX.INDEX_DOM_EXT, 'NLS_soft =binary'),
              BIT.ref_noReal Time SQL Monitoring Report:
    Global Information
    Status              :  EXECUTING
    Instance ID         :  3
    Session ID          :  2941
    SQL ID              :  1htru5m48h2cs
    SQL Execution ID    :  50331658
    Plan Hash Value     :  3421880714
    Execution Started   :  03/01/2013 14:03:20
    First Refresh Time  :  03/01/2013 14:03:27
    Last Refresh Time   :  03/02/2013 09:43:08
    | Elapsed |   Cpu   |    IO    | Concurrency | Cluster  |  Other   | Buffer | Reads |
    | Time(s) | Time(s) | Waits(s) |  Waits(s)   | Waits(s) | Waits(s) |  Gets  |       |
    |   70788 |   66482 |     0.16 |        1135 |     0.16 |     3170 |  2267M |     3 |
    SQL Plan Monitoring Details
    ==========================================================================================================================================================================
    | Id    |                  Operation                   |      Name      |  Rows   | Cost |   Time    | Start  | Starts |   Rows   | Memory | Activity  | Activity Detail |
    |       |                                              |                | (Estim) |      | Active(s) | Active |        | (Actual) |        | (percent) |   (sample #)    |
    ==========================================================================================================================================================================
    |     0 | SELECT STATEMENT                             |                |         |    7 |           |        |      1 |          |        |           |                 |
    |     1 |   SORT ORDER BY                              |                |       1 |    7 |     23645 |  +2715 |      1 |        0 |        |           |                 |
    |     2 |    FILTER                                    |                |         |      |     23645 |  +2715 |      1 |       37 |        |           |                 |
    |     3 |     NESTED LOOPS                             |                |         |      |     23645 |  +2715 |      1 |       37 |        |           |                 |
    |     4 |      NESTED LOOPS                            |                |       1 |    6 |     27708 |     +7 |      1 |       37 |        |           |                 |
    |     5 |       NESTED LOOPS OUTER                     |                |       1 |    3 |     27708 |     +7 |      1 |      364 |        |           |                 |
    |  -> 6 |        NESTED LOOPS                          |                |       1 |    0 |     70782 |     +7 |      1 |      364 |        |           |                 |
    |  -> 7 |         MERGE JOIN CARTESIAN                 |                |       1 |    0 |     70782 |     +7 |      1 |    8418K |        |           |                 |
    |     8 |          PARTITION RANGE SINGLE              |                |       1 |    0 |     70766 |     +7 |      1 |     1256 |        |           |                 |
    |  -> 9 |           INDEX RANGE SCAN                   | ABBBA_BIT_AK2  |       1 |    0 |     70782 |     +7 |      1 |     1256 |        |           |                 |
    |    10 |          BUFFER SORT                         |                |       1 |    0 |     70782 |     +7 |   1256 |    8418K |   338K |      0.03 | Cpu (4)         |
    |    11 |           PARTITION RANGE SINGLE             |                |       1 |    0 |         1 |     +7 |      1 |     6705 |        |           |                 |
    |    12 |            TABLE ACCESS BY LOCAL INDEX ROWID | SOFT_INDEX     |       1 |    0 |         1 |     +7 |      1 |     6705 |        |           |                 |
    |    13 |             INDEX RANGE SCAN                 | SOFT_INDEX_BK1 |       1 |    0 |         1 |     +7 |      1 |     6705 |        |           |                 |
    |    14 |         PARTITION RANGE SINGLE               |                |       1 |    0 |     68305 |     +7 |  8418K |      364 |        |      0.04 | Cpu (5)         |
    | -> 15 |          TABLE ACCESS BY LOCAL INDEX ROWID   | BIT            |       1 |    0 |     70783 |     +7 |  8418K |      364 |        |     81.90 | Cpu (11320)     |
    |    16 |           INDEX RANGE SCAN                   | BIT_BK3        |       1 |    0 |     70782 |     +7 |  8418K |    4295M |        |     18.03 | Cpu (2492)      |
    |    17 |        TABLE ACCESS BY INDEX ROWID           | MONUMENT       |       1 |    3 |           |        |    364 |          |        |           |                 |
    |    18 |         INDEX RANGE SCAN                     | MONUMENT_IF2   |       1 |    2 |           |        |    364 |          |        |           |                 |
    |    19 |       INDEX RANGE SCAN                       | DRAG_IF1       |       1 |    2 |     23645 |  +2715 |    364 |       37 |        |           |                 |
    |    20 |      TABLE ACCESS BY INDEX ROWID             | DRAG           |       1 |    3 |     23645 |  +2715 |     37 |       37 |        |           |                 |
    ==========================================================================================================================================================================Execution plan fetched using dbms_xplan.display_cursor.
    | Id  | Operation                                  | Name           | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                           |                |       |       |     7 (100)|          |       |       |
    |   1 |  SORT ORDER BY                             |                |     1 |  1759 |     7  (15)| 00:00:01 |       |       |
    |*  2 |   FILTER                                   |                |       |       |            |          |       |       |
    |   3 |    NESTED LOOPS                            |                |       |       |            |          |       |       |
    |   4 |     NESTED LOOPS                           |                |     1 |  1759 |     6   (0)| 00:00:01 |       |       |
    |   5 |      NESTED LOOPS OUTER                    |                |     1 |  1749 |     3   (0)| 00:00:01 |       |       |
    |   6 |       NESTED LOOPS                         |                |     1 |  1730 |     0   (0)|          |       |       |
    |   7 |        MERGE JOIN CARTESIAN                |                |     1 |   968 |     0   (0)|          |       |       |
    |   8 |         PARTITION RANGE SINGLE             |                |     1 |    26 |     0   (0)|          |   KEY |   KEY |
    |*  9 |          INDEX RANGE SCAN                  | ABBBA_BIT_AK2  |     1 |    26 |     0   (0)|          |   KEY |   KEY |
    |  10 |         BUFFER SORT                        |                |     1 |   942 |     0   (0)|          |       |       |
    |  11 |          PARTITION RANGE SINGLE            |                |     1 |   942 |     0   (0)|          |   KEY |   KEY |
    |  12 |           TABLE ACCESS BY LOCAL INDEX ROWID| SOFT_INDEX     |     1 |   942 |     0   (0)|          |   KEY |   KEY |
    |* 13 |            INDEX RANGE SCAN                | SOFT_INDEX_BK1 |     1 |       |     0   (0)|          |   KEY |   KEY |
    |  14 |        PARTITION RANGE SINGLE              |                |     1 |   762 |     0   (0)|          |   KEY |   KEY |
    |* 15 |         TABLE ACCESS BY LOCAL INDEX ROWID  | BIT            |     1 |   762 |     0   (0)|          |   KEY |   KEY |
    |* 16 |          INDEX RANGE SCAN                  | BIT_BK3        |     1 |       |     0   (0)|          |   KEY |   KEY |
    |  17 |       TABLE ACCESS BY INDEX ROWID          | MONUMENT       |     1 |    19 |     3   (0)| 00:00:01 |       |       |
    |* 18 |        INDEX RANGE SCAN                    | MONUMENT_IF2   |     1 |       |     2   (0)| 00:00:01 |       |       |
    |* 19 |      INDEX RANGE SCAN                      | DRAG_IF1       |     1 |       |     2   (0)| 00:00:01 |       |       |
    |* 20 |     TABLE ACCESS BY INDEX ROWID            | DRAG           |     1 |    10 |     3   (0)| 00:00:01 |       |       |
    Predicate Information (identified by operation id):
       2 - filter((:27=:28 AND :28=:26 AND :27=:26))
       9 - access("ABBBA_BIT"."PARTITION_KEY"=:28)
           filter(("ABBBA_BIT"."PARTITION_KEY"=:27 AND "ABBBA_BIT"."PARTITION_KEY"=:26))
      13 - access("SOFT_INDEX"."PARTITION_KEY"=:26)
           filter(("SOFT_INDEX"."PARTITION_KEY"=:28 AND "SOFT_INDEX"."PARTITION_KEY"=:27))
      15 - filter(("BIT"."DEL_FL"=:34 AND INTERNAL_FUNCTION("BIT"."GROUP_ID") AND
                  "BIT"."BIT_ID"="ABBBA_BIT"."ABBBA_BIT_ID" AND "BIT"."BIT_ID"="SOFT_INDEX"."BIT_ID"))
      16 - access("BIT"."PARTITION_KEY"=:28)
           filter(("BIT"."PARTITION_KEY"=:26 AND "BIT"."PARTITION_KEY"=:27))
      18 - access("BIT"."BIT_ID"="MONUMENT"."BIT_ID")
           filter("MONUMENT"."BIT_ID" IS NOT NULL)
      19 - access("ABBBA_BIT"."ABBBA_BIT_ID"="drag"."ABBBA_BIT_ID")
      20 - filter(("DRAG"."DRAG_NO"=:29 OR "DRAG"."DRAG_NO"=:30 OR "DRAG"."DRAG_NO"=:31 OR "DRAG"."DRAG_NO"=:32 OR
                  "DRAG"."DRAG_NO"=:33))Edited by: Yasu on Mar 3, 2013 12:53 AM

    why you you waste your time & our time since you rarely get answers to your questions here?You are right, even i felt that recently. Its my mistake that i did not care to mark most of my threads as answered. Does that state i need to go back and mark all my old threads as answered ?
    My role is some what isolated, i have to do it on my own. So some times i think of posting questions here in hope of getting some clues but at the same time i don't feel bad if i don't get answers, since i have learned a lot from this forum.
    TABLE_NAME                       NUM_ROWS LAST_ANALYZED
    MONUMENT                          7978540 22-FEB-13
    DRAG                               406030 20-FEB-13
    BIT                             121783270 02-MAR-13
    SOFT_INDEX                      119212340 26-FEB-13
    ABBBA_HIT                       121276950 22-FEB-13Edited by: Yasu on Mar 3, 2013 9:40 AM

  • Good issue (601) before stock exist (101) can be executed ?

    Dear SAP Expert,
    i have situation in my user, for example :
    1. we have GR (101) CBU for ready to sale in posting date 11/03/2011
    2. and the user want to sale that CBU in 10/03/2011
    3. when i check MB5B, stock on posting date. stock only exist in 11/03/2011 and in 10/03/2011 no stock exit
    4. and when user try to post GI in 10/03/2011, the transaction successfully (even though no schedule lines in SO for 10/03/2011, the user directly post via VL02N)
    5. when i check MB5B, stock 10/03/2011 Begin 0, end -1 and stock 11/03/2011 Begin -1, end 0 (GR 1)
    the question is it possible GI even though no stock in stock poting date 10/03/2011. note : 11/03/2011 is my system date and last stock = 1
    can anyone help for this issue
    Thanks for your help
    Regards
    Budhi

    Hi Kapil,
    thanks for your answer,
    for this issue i'm try to simulate via MB1A with sales order consumption. when GI with VL02N document date and posting date are different (document date 11.03.2011 and posting date 10.03.2011). so comes my newbie conclusion
    1. is it possible in SD, inventory movement based on document date
        A : nope .. i try with same date via MB1A (document date : 10.03.2011 and posting date : 10.03.2011)
    2. is it possible negative stock in my config permitted
       A : i already check in that plant no negative value permitted
    3. last of my thought, in SD will confirm stock only by current date and the future (estimated available). because in actual the stock already exist. so i confirm with my CO consultant, if problem will appear for GR finish good and consumption component in 11.03.2011 and GI in 10.03.2011 (still waiting this answer).
    so based your answer i think it solve my answer as long no more valid commentary.
    and again thank for your help

  • How do I fix extremely slow rendering with buffered images?

    I've found random examples of people with this problem, but I can't seem to find any solutions in my googling. So I figured I'd go to the source. Basically, I am working on a simple platform game in java (an applet) as a surprise present for my girlfriend. The mechanics work fine, and are actually really fast, but the graphics are AWFUL. I wanted to capture some oldschool flavor, so I want to render several backgrounds scrolling in paralax (the closest background scrolls faster than far backgrounds). All I did was take a buffered image and create a graphics context for it. I pass that graphics context through several functions, drawing the background, the distant paralax, the player/entities, particles, and finally close paralax.
    Only problem is it runs at like 5 fps (estimated, I havn't actually counted).
    I KNOW this is a graphics thing, because I can make it run quite smoothly by commenting out the code to draw the background/paralax backgrounds... and that code is nothing more complicated than a graphics2d.drawImage
    So obviously I am doing something wrong here... how do I speed this up?
    Code for main class follows:
    import javax.swing.JApplet;
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.event.*;
    import Entities.*;
    import Worlds.*;
    // run this applet in 640x480
    public class Orkz extends JApplet implements Runnable, KeyListener
         double x_pos = 10;
         double y_pos = 400;
         int xRes=640;
         int yRes=480;
         boolean up_held;
         boolean down_held;
         boolean left_held;
         boolean right_held;
         boolean jump_held;
         Player player;
         World world;
         BufferedImage buffer;
         Graphics2D bufferG2D;
         int radius = 20;
         public void init()
              //xRes=(int) this.getSize().getWidth();
              //yRes=(int) this.getSize().getHeight();
            buffer=new BufferedImage(xRes, yRes, BufferedImage.TYPE_INT_RGB);
            bufferG2D=buffer.createGraphics();
              addKeyListener(this);
         public void start ()
                player=new Player(320, 240, xRes,yRes);
                world=new WorldOne(player, getCodeBase(), xRes, yRes);
                player.setWorld(world);
               // define a new thread
               Thread th = new Thread (this);
               // start this thread
               th.start ();
         public void keyPressed(KeyEvent e)
              //works fine
         }//end public void keypressed
         public void keyReleased(KeyEvent e)
              //this works fine
         public void keyTyped(KeyEvent e)
         public void paint( Graphics g )
               update( g );
        public void update(Graphics g)
             Graphics2D g2 = (Graphics2D)g;              
             world.render(bufferG2D);                
             g2.drawImage(buffer, null, null);
         public void run()
              // lower ThreadPriority
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              long tm;
              long tm2;
              long tm3;
              long tmAhead=0;
              // run a long while (true) this means in our case "always"
              while (true)
                   tm = System.currentTimeMillis();
                   player.moveEntity();
                  x_pos=player.getXPos();
                  y_pos=player.getYPos();
                  tm2 = System.currentTimeMillis();
                    if ((tm2-tm)<20)
                     // repaint the applet
                     repaint();
                    else
                         System.out.println("Skipped draw");
                    tm3= System.currentTimeMillis();
                    tmAhead=25-(tm3-tm);
                    try
                        if (tmAhead>0) 
                         // Stop thread for 20 milliseconds
                          Thread.sleep (tmAhead);
                          tmAhead=0;
                        else
                             System.out.println("Behind");
                    catch (InterruptedException ex)
                          System.out.println("Exception");
                    // set ThreadPriority to maximum value
                    Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
         public void stop() { }
         public void destroy() { }
    }Here's the code for the first level
    package Worlds;
    import java.awt.Color;
    import java.awt.Graphics2D;
    import java.awt.image.BufferedImage;
    import java.util.*;
    import javax.swing.*;
    import javax.imageio.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.File;
    import java.net.URL;
    import java.awt.geom.AffineTransform;
    import Entities.Player;
    public class WorldOne implements World
         Player player;
         //Location of Applet
         URL codeBase;
         // Image Resources
         BufferedImage paralax1Image;
         BufferedImage paralax2Image;
         BufferedImage backgroundImage;
         // Graphics Elements     
         int xRes;
         int yRes;
         double paralaxScale1,paralaxScale2;
         double worldSize;
         int frameX=1;
         int frameY=1;
         public WorldOne(Player player, URL codeBase, int xRes, int yRes)
              this.player=player;
              this.codeBase=codeBase;
              this.xRes=xRes;
              this.yRes=yRes;
              worldSize=4000;
            String backgroundImagePath="worlds\\world1Graphics\\WorldOneBack.png";
            String paralax1ImagePath="worlds\\world1Graphics\\WorldOnePara1.png";
            String paralax2ImagePath="worlds\\world1Graphics\\WorldOnePara2.png";
            try
            URL url1 = new URL(codeBase, backgroundImagePath);
             URL url2 = new URL(codeBase, paralax1ImagePath);
             URL url3 = new URL(codeBase, paralax2ImagePath);
            backgroundImage = ImageIO.read(url1);
            paralax1Image  = ImageIO.read(url2);
            paralax2Image = ImageIO.read(url3);
            paralaxScale1=(paralax1Image.getWidth()-xRes)/worldSize;
            paralaxScale2=(paralax2Image.getWidth()-xRes)/worldSize;
            catch (Exception e)
                 System.out.println("Failed to load Background Images in Scene");
                 System.out.println("Background Image Path:"+backgroundImagePath);
                 System.out.println("Background Image Path:"+paralax1ImagePath);
                 System.out.println("Background Image Path:"+paralax2ImagePath);
         }//end constructor
         public double getWorldSize()
              double xPos=player.getXPos();
              return worldSize;
         public void setFramePos(int frameX, int frameY)
              this.frameX=frameX;
              this.frameY=frameY;
         public int getFrameXPos()
              return frameX;
         public int getFrameYPos()
              return frameY;
         public void paralax1Render(Graphics2D renderSpace)
              int scaledFrame=(int)(paralaxScale1*frameX);
              renderSpace.drawImage(paralax1Image,-scaledFrame,0,null); //Comment this to increase performance Massively
         public void paralax2Render(Graphics2D renderSpace)
              int scaledFrame=(int)(paralaxScale2*frameX);
              renderSpace.drawImage(paralax2Image,-scaledFrame,0,null); //Comment this to increase performance Massively
         public void backgroundRender(Graphics2D renderSpace)
              renderSpace.drawImage(backgroundImage,null,null); //Comment this to increase performance Massively
         public void entityRender(Graphics2D renderSpace)
              //System.out.println(frameX);
              double xPos=player.getXPos()-frameX+xRes/2;
             double yPos=player.getYPos();
             int radius=15;
             renderSpace.setColor (Color.blue);
            // paint a filled colored circle
             renderSpace.fillOval ((int)xPos - radius, (int)yPos - radius, 2 * radius, 2 * radius);
              renderSpace.setColor(Color.blue);
         public void particleRender(Graphics2D renderSpace)
              //NYI
         public void render(Graphics2D renderSpace)
              backgroundRender(renderSpace);
              paralax2Render(renderSpace);
              entityRender(renderSpace);
              paralax1Render(renderSpace);
    }//end class WorldOneI can post more of the code if people need clarification. And to emphasize, if I take off the calls to display the background images (the 3 lines where you do this are noted), it works just fine, so this is purely a graphical slowdown, not anything else.
    Edited by: CthulhuChild on Oct 27, 2008 10:04 PM

    are the parallax images translucent by any chance? The most efficient way to draw images with transparent areas is to do something like this:
         public static BufferedImage optimizeImage(BufferedImage img)
              GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();                    
              GraphicsConfiguration gc = gd.getDefaultConfiguration();
              boolean istransparent = img.getColorModel().hasAlpha();
              BufferedImage img2 = gc.createCompatibleImage(img.getWidth(), img.getHeight(), istransparent ? Transparency.BITMASK : Transparency.OPAQUE);
              Graphics2D g = img2.createGraphics();
              g.drawImage(img, 0, 0, null);
              g.dispose();
              return img2;
         }I copied this from a util class I have and I had to modify it a little, I hope I didn't break anything.
    This piece of code does a number of things:
    - it allows the images to be hardware accelerated
    - the returned image is 100% compatible with the display, regardless of what the input image is
    - BITMASK transparent images are an incredible amount faster than translucent images
    BITMASK means that a pixel is either fully transparent or it is fully opaque; there is no alpha blending being performed. Alpha blending in software rendering mode is very slow, so this may be the bottleneck that is bothering you.
    If you require your parallax images to be translucent then I wouldn't know how to get it to draw quicker in an applet, other than trying out java 6 update 10 to see if it fixes things.

  • Automatic Parallelism causes Merge statement to take longer.

    We have a problem in a new project as part of the ETL load into the Oracle datawarehouse we perform a merge statement to update rows in a global temporary table then load
    the results into a permanant table, when testing with automatic parallel execution enabled the plan changes and the merge never finishes and consumes vast amounts of resources.
    The database version is:-
    Database version :11.2.0.3
    OS: redhat 64bit
    three node rac 20 cores per node
    when executing serially the query response is typically similar to the following:
    MERGE /*+ gather_plan_statistics no_parallel */ INTO T_GTTCHARGEVALUES USING
      (SELECT
      CASTACCOUNTID,
      CHARGESCHEME,
      MAX(CUMULATIVEVALUE) AS MAXMONTHVALUE,
      MAX(CUMULATIVECOUNT) AS MAXMONTHCOUNT
    FROM
      V_CACHARGESALL
    WHERE
      CHARGEDATE >= TRUNC(TO_DATE(:B1,'YYYY-MM-DD'),'MM')
      AND CHARGEDATE < TO_DATE(:B1,'YYYY-MM-DD')
    GROUP BY
       CASTACCOUNTID,
       CHARGESCHEME
    HAVING MAX(CUMULATIVECOUNT) IS NOT NULL ) MTOTAL
    ON
      (T_GTTCHARGEVALUES.CASTACCOUNTID=MTOTAL.CASTACCOUNTID AND
      T_GTTCHARGEVALUES.CHARGESCHEME=MTOTAL.CHARGESCHEME)
    WHEN MATCHED
    THEN UPDATE SET
      CUMULATIVEVALUE=CUMULATIVEVALUE+MTOTAL.MAXMONTHVALUE ,
      CUMULATIVECOUNT=CUMULATIVECOUNT+MTOTAL.MAXMONTHCOUNT;
    1448340 rows merged.
    select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); 
    | Id  | Operation                       | Name              | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    |   0 | MERGE STATEMENT                 |                   |      1 |        |      0 |00:03:08.43 |    2095K|    186K|       |       |          |
    |   1 |  MERGE                          | T_GTTCHARGEVALUES |      1 |        |      0 |00:03:08.43 |    2095K|    186K|       |       |          |
    |   2 |   VIEW                          |                   |      1 |        |   1448K|00:02:53.14 |     619K|    177K|       |       |          |
    |*  3 |    HASH JOIN                    |                   |      1 |      1 |   1448K|00:02:52.70 |     619K|    177K|   812K|   812K| 1218K (0)|
    |   4 |     VIEW                        |                   |      1 |      1 |    203 |00:02:51.26 |     608K|    177K|       |       |          |
    |*  5 |      FILTER                     |                   |      1 |        |    203 |00:02:51.26 |     608K|    177K|       |       |          |
    |   6 |       SORT GROUP BY             |                   |      1 |      1 |    480 |00:02:51.26 |     608K|    177K| 73728 | 73728 |          |
    |*  7 |        FILTER                   |                   |      1 |        |     21M|00:02:56.04 |     608K|    177K|       |       |          |
    |   8 |         PARTITION RANGE ITERATOR|                   |      1 |    392K|     21M|00:02:51.32 |     608K|    177K|       |       |          |
    |*  9 |          TABLE ACCESS FULL      | T_CACHARGES       |     24 |    392K|     21M|00:02:47.48 |     608K|    177K|       |       |          |
    |  10 |     TABLE ACCESS FULL           | T_GTTCHARGEVALUES |      1 |   1451K|   1451K|00:00:00.48 |   10980 |      0 |       |       |          |
    Predicate Information (identified by operation id):
       3 - access("T_GTTCHARGEVALUES"."CASTACCOUNTID"="MTOTAL"."CASTACCOUNTID" AND "T_GTTCHARGEVALUES"."CHARGESCHEME"="MTOTAL"."CHARGESCHEME")
       5 - filter(MAX("CUMULATIVECOUNT") IS NOT NULL)
       7 - filter(TRUNC(TO_DATE(:B1,'YYYY-MM-DD'),'fmmm')<TO_DATE(:B1,'YYYY-MM-DD'))
       9 - filter(("LOGICALLYDELETED"=0 AND "CHARGEDATE">=TRUNC(TO_DATE(:B1,'YYYY-MM-DD'),'fmmm') AND "CHARGEDATE"<TO_DATE(:B1,'YYYY-MM-DD')))removing the no_parallel hint results in the following, (this is pulled from the sql monitoring report and editied to remove the lines relating to individual parallel servers)
    I understand that the query is considered for parallel execution due to the estimated length of time it will run for and although the degree of parallleism seems excessive
    it is the default maximum for the server configuration, what we are tryig to understand is which statistics could be inacurate or missing and could cause this kind of problem.
    In this case we can add the no_parallel hint in the etl package as a workaround but would really liek to identify the root cause to avoid similar problems elsewhere.
    SQL Monitoring Report
    SQL Text
    MERGE INTO T_GTTCHARGEVALUES USING (SELECT CASTACCOUNTID, CHARGESCHEME, MAX(CUMULATIVEVALUE) AS MAXMONTHVALUE,
    MAX(CUMULATIVECOUNT) AS MAXMONTHCOUNT FROM V_CACHARGESALL WHERE CHARGEDATE >= TRUNC(TO_DATE(:B1,'YYYY-MM-DD'),'MM')
    AND CHARGEDATE < to_date(:B1,'YYYY-MM-DD')
    GROUP BY CASTACCOUNTID, CHARGESCHEME HAVING MAX(CUMULATIVECOUNT) IS NOT NULL ) MTOTAL
    ON (T_GTTCHARGEVALUES.CASTACCOUNTID=MTOTAL.CASTACCOUNTID AND
    T_GTTCHARGEVALUES.CHARGESCHEME=MTOTAL.CHARGESCHEME) WHEN MATCHED THEN UPDATE SET
    CUMULATIVEVALUE=CUMULATIVEVALUE+MTOTAL.MAXMONTHVALUE ,
    CUMULATIVECOUNT=CUMULATIVECOUNT+MTOTAL.MAXMONTHCOUNT
    Error: ORA-1013
    ORA-01013: user requested cancel of current operation
    Global Information
    Status              :  DONE (ERROR)
    Instance ID         :  1
    Session             :  XXXX(2815:12369)
    SQL ID              :  70kzttjbyyspt
    SQL Execution ID    :  16777216
    Execution Started   :  04/27/2012 09:43:27
    First Refresh Time  :  04/27/2012 09:43:27
    Last Refresh Time   :  04/27/2012 09:48:43
    Duration            :  316s
    Module/Action       :  SQL*Plus/-
    Service             :  SYS$USERS
    Program             :  sqlplus@XXXX (TNS V1-V3)
    Binds
    ========================================================================================================================
    | Name | Position |     Type     |                                        Value                                        |
    ========================================================================================================================
    | :B1  |        1 | VARCHAR2(32) | 2012-04-25                                                                          |
    ========================================================================================================================
    Global Stats
    ====================================================================================================================
    | Elapsed | Queuing |   Cpu   |    IO    | Application | Concurrency | Cluster  |  Other   | Buffer | Read | Read  |
    | Time(s) | Time(s) | Time(s) | Waits(s) |  Waits(s)   |  Waits(s)   | Waits(s) | Waits(s) |  Gets  | Reqs | Bytes |
    ====================================================================================================================
    |    7555 |    0.00 |    4290 |     2812 |        0.08 |          27 |      183 |      243 |     3M | 294K |   7GB |
    ====================================================================================================================
    SQL Plan Monitoring Details (Plan Hash Value=323941584)
    ==========================================================================================================================================================================================================
    | Id |             Operation             |       Name        |  Rows   | Cost  |   Time    | Start  | Execs |   Rows   | Read | Read  |  Mem  | Activity |                Activity Detail                |
    |    |                                   |                   | (Estim) |       | Active(s) | Active |       | (Actual) | Reqs | Bytes | (Max) |   (%)    |                  (# samples)                  |
    ==========================================================================================================================================================================================================
    |  0 | MERGE STATEMENT                   |                   |         |       |           |        |     1 |          |      |       |       |          |                                               |
    |  1 |   MERGE                           | T_GTTCHARGEVALUES |         |       |           |        |     1 |          |      |       |       |          |                                               |
    |  2 |    PX COORDINATOR                 |                   |         |       |        57 |     +1 |   481 |        0 |  317 |   5MB |       |     4.05 | latch: shared pool (40)                       |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | os thread startup (17)                        |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | Cpu (7)                                       |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | DFS lock handle (36)                          |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | SGA: allocation forcing component growth (14) |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | latch: parallel query alloc buffer (200)      |
    |  3 |     PX SEND QC (RANDOM)           | :TQ10003          |       1 | 19054 |           |        |       |          |      |       |       |          |                                               |
    |  4 |      VIEW                         |                   |         |       |           |        |       |          |      |       |       |          |                                               |
    |  5 |       FILTER                      |                   |         |       |           |        |       |          |      |       |       |          |                                               |
    |  6 |        SORT GROUP BY              |                   |       1 | 19054 |           |        |       |          |      |       |       |          |                                               |
    |  7 |         PX RECEIVE                |                   |       1 | 19054 |           |        |       |          |      |       |       |          |                                               |
    |  8 |          PX SEND HASH             | :TQ10002          |       1 | 19054 |           |        |   240 |          |      |       |       |          |                                               |
    |  9 |           SORT GROUP BY           |                   |       1 | 19054 |       246 |    +70 |   240 |        0 |      |       |  228M |    49.32 | Cpu (3821)                                    |
    | 10 |            FILTER                 |                   |         |       |       245 |    +71 |   240 |       3G |      |       |       |     0.08 | Cpu (6)                                       |
    | 11 |             HASH JOIN             |                   |       1 | 19054 |       259 |    +57 |   240 |       3G |      |       |  276M |     4.31 | Cpu (334)                                     |
    | 12 |              PX RECEIVE           |                   |      1M |     5 |       259 |    +57 |   240 |       1M |      |       |       |     0.04 | Cpu (3)                                       |
    | 13 |               PX SEND HASH        | :TQ10000          |      1M |     5 |         6 |    +56 |   240 |       1M |      |       |       |     0.01 | Cpu (1)                                       |
    | 14 |                PX BLOCK ITERATOR  |                   |      1M |     5 |         6 |    +56 |   240 |       1M |      |       |       |     0.03 | Cpu (1)                                       |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | PX Deq: reap credit (1)                       |
    | 15 |                 TABLE ACCESS FULL | T_GTTCHARGEVALUES |      1M |     5 |         7 |    +55 |  5486 |       1M | 5487 |  86MB |       |     2.31 | gc cr grant 2-way (3)                         |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc current block lost (7)                     |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | Cpu (7)                                       |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | db file sequential read (162)                 |
    | 16 |              PX RECEIVE           |                   |     78M | 19047 |       255 |    +61 |   240 |     801K |      |       |       |     0.03 | IPC send completion sync (2)                  |
    | 17 |               PX SEND HASH        | :TQ10001          |     78M | 19047 |       250 |    +66 |   240 |       3M |      |       |       |     0.06 | Cpu (5)                                       |
    | 18 |                PX BLOCK ITERATOR  |                   |     78M | 19047 |       250 |    +66 |   240 |       4M |      |       |       |          |                                               |
    | 19 |                 TABLE ACCESS FULL | T_CACHARGES       |     78M | 19047 |       254 |    +62 |  1016 |       4M | 288K |   6GB |       |    37.69 | gc buffer busy acquire (104)                  |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc cr block 2-way (1)                         |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc cr block lost (9)                          |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc cr grant 2-way (14)                        |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc cr multi block request (1)                 |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc current block 2-way (3)                    |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc current block 3-way (2)                    |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc current block busy (1)                     |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | gc current grant busy (2)                     |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | Cpu (58)                                      |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | latch: gc element (1)                         |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | db file parallel read (26)                    |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | db file scattered read (207)                  |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | db file sequential read (2433)                |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | direct path read (1)                          |
    |    |                                   |                   |         |       |           |        |       |          |      |       |       |          | read by other session (57)                    |
    ==========================================================================================================================================================================================================
    Parallel Execution Details (DOP=240 , Servers Allocated=480)
    Instances  : 3

    chris_c wrote:
    | Id  | Operation                       | Name              | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    |*  9 |          TABLE ACCESS FULL      | T_CACHARGES       |     24 |    392K|     21M|00:02:47.48 |     608K|    177K|       |       |          |
    Based on the discrepancy between the estimated number of rows and the actual, and the below posted bind value of 2012-04-25 i'd first be checking if the statistics on T_CACHARGES are up to date.
    As a reference
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4399338600346902127
    So that would be my first avenue of exploration.
    Cheers,

  • Gather_table_stats with a method opt of "for all indexed columns size 0"

    I have 9 databases I support that contain the same structure, and very similar data concentrations. We are seeing inconsistent performance in the different databases due to bind variable peeking.. I have tracked it down to the Min and Max values that are gathered during the analyze. I analyze from one cluster, and export/import those statistics into the other clusters.. I then go about locking down the stats gathered. Some of the statistics are on tables that contain transient data (the older data is purged, and new data gets a new PK sequence number).
    Since I am gathering statistics with a 'FOR ALL INDEXED COLUMNS SIZE 1', a min and max value are grabbed. This value is only appropriate for a short period of time, and only for a specific database. I do want oracle to know the density to help calculate, but I don't want cardinality based on whether the current bind values fall in this range..
    Example
    COLUMN PK
    When I analyze the min is 1 and max is 5. I then let the database run, and the new min is 100 and max is 105.. same number of rows, but different min/max. At first a select * from table where pk>=1 and pk <=5 would return a cardinality of 5.. Later, a seelct * from tables where pk>=100 and pk<=105 would return a cardinaility 1.
    Any ideas how to avoid this other than trying set min and max to something myself (like min =1 max = 99999999). ??

    MarkDPowell wrote:
    The Oracle documentation on bind variable peeking said it did not peek without histograms and I cannot remember ever seeing on 9.2 where the trace showed otherwise. Mark,
    see this simple test case run on 9.2.0.8. No histograms, but bind variable peeking, as you can see that the EXPLAIN PLAN output generated by AUTOTRACE differs from the estimated cardinality of the actual plan used at runtime.
    Which documentation do you refer to?
    SQL>
    SQL> alter session set nls_language = 'AMERICAN';
    Session altered.
    SQL>
    SQL> drop table bind_peek_test;
    Table dropped.
    SQL>
    SQL> create table bind_peek_test
      2  as
      3  select
      4             100 as n1
      5           , cast(dbms_random.string('a', 20) as varchar2(20)) as filler
      6  from
      7             dual
      8  connect by
      9             level <= 1000;
    Table created.
    SQL>
    SQL> exec dbms_stats.gather_table_stats(null, 'bind_peek_test', method_opt=>'FOR ALL COLUMNS SIZE 1')
    PL/SQL procedure successfully completed.
    SQL>
    SQL> variable n number
    SQL>
    SQL> variable n2 number
    SQL>
    SQL> alter system flush shared_pool;
    System altered.
    SQL>
    SQL> exec :n := 1; :n2 := 50;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> set autotrace traceonly
    SQL>
    SQL> select * from bind_peek_test where n1 >= :n and n1 <= :n2;
    no rows selected
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1000 Bytes=24
              000)
       1    0   FILTER
       2    1     TABLE ACCESS (FULL) OF 'BIND_PEEK_TEST' (Cost=2 Card=100
              0 Bytes=24000)
    Statistics
            236  recursive calls
              0  db block gets
             35  consistent gets
              0  physical reads
              0  redo size
            299  bytes sent via SQL*Net to client
            372  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              4  sorts (memory)
              0  sorts (disk)
              0  rows processed
    SQL>
    SQL> set autotrace off
    SQL>
    SQL> select
      2             cardinality
      3  from
      4             v$sql_plan
      5  where
      6             cardinality is not null
      7  and      hash_value in (
      8    select
      9            hash_value
    10    from
    11            v$sql
    12    where
    13            sql_text like 'select * from bind_peek_test%'
    14    );
    CARDINALITY
              1
    SQL>
    SQL> alter system flush shared_pool;
    System altered.
    SQL>
    SQL> exec :n := 100; :n2 := 100;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> set autotrace traceonly
    SQL>
    SQL> select * from bind_peek_test where n1 >= :n and n1 <= :n2;
    1000 rows selected.
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1000 Bytes=24
              000)
       1    0   FILTER
       2    1     TABLE ACCESS (FULL) OF 'BIND_PEEK_TEST' (Cost=2 Card=100
              0 Bytes=24000)
    Statistics
            236  recursive calls
              0  db block gets
            102  consistent gets
              0  physical reads
              0  redo size
          34435  bytes sent via SQL*Net to client
           1109  bytes received via SQL*Net from client
             68  SQL*Net roundtrips to/from client
              4  sorts (memory)
              0  sorts (disk)
           1000  rows processed
    SQL>
    SQL> set autotrace off
    SQL>
    SQL> select
      2             cardinality
      3  from
      4             v$sql_plan
      5  where
      6             cardinality is not null
      7  and      hash_value = (
      8    select
      9            hash_value
    10    from
    11            v$sql
    12    where
    13            sql_text like 'select * from bind_peek_test%'
    14    );
    CARDINALITY
           1000
    SQL>
    SQL> spool offRegards,
    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/

  • ORA-01652 due to a SELECT DISTIINCT...ORDER BY

    Hi all,
    the query below fill my 32GB temporary tablespace and I get an ORA-01652.
    SELECT DISTINCT x.nuaud, TO_CHAR (x.times, 'DD/MM/YY HH24:MI'), x.inde1,
                    x.inde2, x.inde3, x.inde4, NVL (y.litab, '????'),
                    NVL (x.useru,
                         SUBSTR (SUBSTR (x.progr, 1, INSTR (x.progr, '.') - 1),
                                 1,
                                 8
                    x.dmlst, x.nublk, x.blkfc, x.nbord, 'A'
               FROM audtab x, audlib y
              WHERE x.cotab = y.cotab(+)
                AND DECODE (y.colan(+), 'A', 1, 0) = 1
                and exists (select 1 from audtri z where z.cotab = x.cotab)
           ORDER BY 1, 12, 10;some informations here:
    SQL> select 'audtab', count(1) from audtab
      2    union all
      3    select 'audlib', count(1) from audlib
      4    union all
      5    select 'audtri', count(1) from audtri;
    'AUDTA   COUNT(1)
    audtab  118804430
    audlib        446
    audtri        219
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionI added an other datafile of 32GB to my temporary tablespace and now the query has been running for 1 hour and I have 52GB used in my temporary tablespace.
    Below is the monitoring report
    Global Information
    Status              :  EXECUTING
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    Instance ID         :  1
    Session             :  UBXADMIN (102:1880)
    SQL ID              :  1dm3gymadu2aa
    SQL Execution ID    :  16777216
    Execution Started   :  03/05/2010 17:51:19
    First Refresh Time  :  03/05/2010 17:51:23
    Last Refresh Time   :  03/05/2010 18:49:11
    Duration            :  3473s
    Module/Action       :  SQL*Plus/-
    Service             :  REC1128
    Program             :  sqlplus.exe
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    Global Stats
    ======================================================================================
    | Elapsed |   Cpu   |    IO    | Concurrency | Buffer | Read | Read  | Write | Write |
    | Time(s) | Time(s) | Waits(s) |  Waits(s)   |  Gets  | Reqs | Bytes | Reqs  | Bytes |
    ======================================================================================
    |    3617 |     846 |     2771 |        0.05 |     5M | 792K |  75GB |  322K |  61GB |
    ======================================================================================
    SQL Plan Monitoring Details (Plan Hash Value=3110686745)
    ============================================================================================================================================
    ============================================================
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    | Id   |         Operation         |  Name   |  Rows   | Cost |   Time    | Start  | Execs |   Rows   | Read | Read  | Write | Write | Mem
    | Temp | Activity |       Activity Detail           | Progress |
    |      |                           |         | (Estim) |      | Active(s) | Active |       | (Actual) | Reqs | Bytes | Reqs  | Bytes |
    |          |   (%)    |         (# samples)         |          |
    ============================================================================================================================================
    ============================================================
    |    0 | SELECT STATEMENT          |         |         |      |           |        |     1 |          |      |       |       |       |
    |          |          |                             |          |
    | -> 1 |   SORT ORDER BY           |         |     90M |  11M |      2163 |  +1312 |     1 |        0 | 105K |   1GB |  157K |  23GB | 509K
    |  24G |              |                             |          |
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    | -> 2 |    HASH UNIQUE            |         |     90M |   6M |      3471 |     +4 |     1 |      99M | 163K |  38GB | 87547 |  20GB |  49M
    |  29G |        42.58 | Cpu (97)                    |          |
    |      |                           |         |         |      |           |        |       |          |      |       |       |       |
    |          |          | direct path write temp (55) |          |
    |    3 |     HASH JOIN RIGHT OUTER |         |     90M |   1M |      1299 |     +4 |     1 |     119M |      |       |       |       |
    |          |     0.84 | Cpu (3)                     |          |
    |    4 |      TABLE ACCESS FULL    | AUDLIB  |       4 |    3 |         1 |     +4 |     1 |      223 |      |       |       |       |
    |          |          |                             |          |
    |    5 |      HASH JOIN            |         |     90M |   1M |      1301 |     +2 |     1 |     119M |      |       |       |       |
    |          |     2.52 | Cpu (9)                     |          |
    |    6 |       SORT UNIQUE         |         |     217 |    1 |         1 |     +4 |     1 |      218 |      |       |       |       |
    |          |          |                             |          |
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    |    7 |        INDEX FULL SCAN    | AUDTRI2 |     217 |    1 |         1 |     +4 |     1 |      219 |      |       |       |       |
    |          |          |                             |          |
    |    8 |       TABLE ACCESS FULL   | AUDTAB  |    115M |   1M |      1300 |     +3 |     1 |     119M | 521K |  36GB | 77094 |  18GB |
    |          |    54.06 | Cpu (14)                    |     100% |
    |      |                           |         |         |      |           |        |       |          |      |       |       |       |
    |          |          | direct path read (179)      |          |
    ============================================================================================================================================
    ============================================================Have someone an idea of how can this query be tune to generate less sort on disk ?
    Thanks for helping

    the query took 6 hours to complete:
    SQL> SELECT DISTINCT x.nuaud, TO_CHAR (x.times, 'DD/MM/YY HH24:MI'), x.inde1,
      2                  x.inde2, x.inde3, x.inde4, NVL (y.litab, '????'),
      3                  NVL (x.useru,
      4                       SUBSTR (SUBSTR (x.progr, 1, INSTR (x.progr, '.') - 1),
      5                               1,
      6                               8
      7                              )
      8                      ),
      9                  x.dmlst, x.nublk, x.blkfc, x.nbord, 'A'
    10             FROM audtab x, audlib y
    11            WHERE x.cotab = y.cotab(+)
    12              AND DECODE (y.colan(+), 'A', 1, 0) = 1
    13              and exists (select 1 from audtri z where z.cotab = x.cotab)
    14         ORDER BY 1, 12, 10;
    118794436 rows selected.
    Elapsed: 06:01:48.89
    Execution Plan
    Plan hash value: 3110686745
    | Id  | Operation               | Name    | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT        |         |    89M|    21G|       |    11M  (1)| 37:29:22 |
    |   1 |  SORT ORDER BY          |         |    89M|    21G|    22G|    11M  (1)| 37:29:22 |
    |   2 |   HASH UNIQUE           |         |    89M|    21G|    22G|  6305K  (1)| 21:01:07 |
    |*  3 |    HASH JOIN RIGHT OUTER|         |    89M|    21G|       |  1364K  (1)| 04:32:53 |
    |*  4 |     TABLE ACCESS FULL   | AUDLIB  |     4 |   144 |       |     3   (0)| 00:00:01 |
    |*  5 |     HASH JOIN           |         |    89M|    18G|       |  1363K  (1)| 04:32:47 |
    |   6 |      SORT UNIQUE        |         |   217 |  1519 |       |     1   (0)| 00:00:01 |
    |   7 |       INDEX FULL SCAN   | AUDTRI2 |   217 |  1519 |       |     1   (0)| 00:00:01 |
    |   8 |      TABLE ACCESS FULL  | AUDTAB  |   115M|    22G|       |  1363K  (1)| 04:32:39 |
    Predicate Information (identified by operation id):
       3 - access("X"."COTAB"="Y"."COTAB"(+))
       4 - filter(DECODE("Y"."COLAN"(+),'A',1,0)=1)
       5 - access("Z"."COTAB"="X"."COTAB")
    Statistics
          69968  recursive calls
         245941  db block gets
        5209702  consistent gets
       13934882  physical reads
              0  redo size
    SP2-0642: SQL*Plus internal error state 1075, context 1:5:4294967295
    Unsafe to proceed
       87116279  bytes received via SQL*Net from client
        7919631  SQL*Net roundtrips to/from client
              1  sorts (memory)
              1  sorts (disk)
      118794436  rows processedI will ask today the development team about the aim of retrieving 100 millions rows.

  • Approval of order

    Hi all,
    Our client's requirement is that before release of maintenance order, it should be approved by two different authorities (i.e. one administrative approval and another is financial approval). Once the order has been approved by the two approvers, only then it can be released.
    How can I acheive this? Please describe in a little detail.
    Please guide me, I am new to PM.
    Thanks in advance,
    Beenish.

    hi beenish ali,
    approval of orders based on permits.....
    "This method is used to automatically assign permits to MO based on maintenance activity types/planned cost of orders/actual cost of orders/estimated cost of orders....."
    1.create ct04characteristicand maintain values or value ranges 10k-20k,30k-to40k of some range if your going to call permits on planning cost here in additional tab mention the tableCSEVPERMIT & any field names
    ILART-Maintenance activity type
    PKOSTEN for planning cost
    USER4 for estimated cost
    IKOSTEN for actual cost.
    2.Create permit class and put the charc in permit class and for class type 049 maintain classification status in IMG.[Cross application components--> classification system->classes---->maintain object types and object keys(here plz read the note and maintain status for class type 049).
    3.Create permits using IPMD and put category , order status and goto classification and maintain permit class and select particular charc value for that permit.
    By the above process respective permits assume that you have given based on planned cost of the order get automatically assigned to the order,now you can maintain authorisation for the permit.Use eqpts which dont have permits and try this method......
    Hope this might have met you requirement.
    Plz try the same and let me know if you have any querries or no ._If working give up points'''_
    regards
    pushpa

  • Sql is very slow

    Sql Query
    SELECT DISTINCT '13ck0823ba', ' ', b.emplid,
                    NVL ((SELECT SUM (b3.total_gross)
                            FROM sysadm.ps_pay_calendar a3,
                                 sysadm.ps_pay_check b3
                           WHERE a3.run_id = a.run_id
                             AND b3.emplid = b.emplid
                             AND b3.company = b.company
                             AND b3.paygroup = b.paygroup
                             AND b3.pay_end_dt = b.pay_end_dt
                             AND a3.company = b.company
                             AND a3.paygroup = b.paygroup
                             AND a3.pay_end_dt = b.pay_end_dt),
                         0
                    0,
                    NVL ((SELECT SUM (b1.lbr_dist_amt)
                            FROM sysadm.ps_py_ldtl_tbl a1,
                                 sysadm.ps_tl_payable_time b1
                           WHERE a1.run_id = a.run_id
                             AND b1.emplid = b.emplid
                             AND a1.pay_system = b1.pay_system
                             AND a1.payroll_req_num = b1.payroll_req_num),
                         0
                        ) AS tl_pay_amt,
                    0,
                    NVL ((SELECT /*+ USE_NL(B2 C2) */
                                 SUM (c2.oi_foreign_amt)
                            FROM sysadm.ps_py_ldtl_tbl a2,
                                 sysadm.ps_tl_payable_time b2,
                                 sysadm.ps_oi_prj_resource c2
                           WHERE a2.run_id = a.run_id
                             AND b2.emplid = b.emplid
                             AND a2.pay_system = b2.pay_system
                             AND a2.payroll_req_num = b2.payroll_req_num
                             AND b2.emplid = c2.emplid
                             AND (   b2.seq_nbr = c2.seq_nbr
                                  OR b2.seq_nbr = SUBSTR (c2.resource_id, -13, 12)
                             AND b2.dur = c2.trans_dt
                             AND c2.analysis_type = 'TLB'),
                         0
                        ) AS tlb_pay,
                    0, 0, 0
               FROM sysadm.ps_pay_calendar a, sysadm.ps_pay_check b
              WHERE a.run_id = '13CK0823BA'
                AND a.company = b.company
                AND a.paygroup = b.paygroup
                AND a.pay_end_dt = b.pay_end_dt;
    Explain Plan
    | Id  | Operation                      | Name               | Rows  | Bytes | Cost (%CPU)| Time     | Inst   |IN-OUT|
    |   0 | SELECT STATEMENT               |                    |   354 | 18054 |     7  (15)| 00:00:01 |        |      |
    |   1 |  SORT AGGREGATE                |                    |     1 |    56 |            |          |        |      |
    |   2 |   NESTED LOOPS                 |                    |       |       |            |          |        |      |
    |   3 |    NESTED LOOPS                |                    |     1 |    56 |     4   (0)| 00:00:01 |        |      |
    |*  4 |     INDEX RANGE SCAN           | PS0PAY_CALENDAR    |     1 |    26 |     1   (0)| 00:00:01 |        |      |
    |*  5 |     INDEX RANGE SCAN           | PS1PAY_CHECK       |     1 |       |     2   (0)| 00:00:01 |        |      |
    |   6 |    TABLE ACCESS BY INDEX ROWID | PS_PAY_CHECK       |     1 |    30 |     3   (0)| 00:00:01 |        |      |
    |   7 |  SORT AGGREGATE                |                    |     1 |    40 |            |          |        |      |
    |*  8 |   HASH JOIN                    |                    |    11 |   440 |   151   (1)| 00:00:02 |        |      |
    |*  9 |    INDEX RANGE SCAN            | PS0PY_LDTL_TBL     |    10 |   190 |     2   (0)| 00:00:01 |        |      |
    |  10 |    TABLE ACCESS BY INDEX ROWID | PS_TL_PAYABLE_TIME |   953 | 20013 |   148   (0)| 00:00:02 |        |      |
    |* 11 |     INDEX RANGE SCAN           | IDX$$_49B90004     |   953 |       |     5   (0)| 00:00:01 |        |      |
    |  12 |  SORT AGGREGATE                |                    |     1 |   118 |            |          |        |      |
    |  13 |   NESTED LOOPS                 |                    |     1 |   118 |    79   (0)| 00:00:01 |        |      |
    |  14 |    NESTED LOOPS                |                    |     1 |    99 |    78   (0)| 00:00:01 |        |      |
    |  15 |     REMOTE                     | PS_PROJ_RESOURCE   |    18 |  1206 |     6   (0)| 00:00:01 | FSLINK | R->S |
    |* 16 |     TABLE ACCESS BY INDEX ROWID| PS_TL_PAYABLE_TIME |     1 |    32 |     4   (0)| 00:00:01 |        |      |
    |* 17 |      INDEX RANGE SCAN          | IDX$$_49B90004     |     1 |       |     3   (0)| 00:00:01 |        |      |
    |* 18 |    INDEX RANGE SCAN            | PS0PY_LDTL_TBL     |     1 |    19 |     1   (0)| 00:00:01 |        |      |
    |  19 |  HASH UNIQUE                   |                    |   354 | 18054 |     7  (15)| 00:00:01 |        |      |
    |  20 |   NESTED LOOPS                 |                    |   354 | 18054 |     6   (0)| 00:00:01 |        |      |
    |* 21 |    INDEX RANGE SCAN            | PS0PAY_CALENDAR    |     3 |    78 |     2   (0)| 00:00:01 |        |      |
    |* 22 |    INDEX RANGE SCAN            | PSEPAY_CHECK       |   103 |  2575 |     2   (0)| 00:00:01 |        |      |
    Predicate Information (identified by operation id):
       4 - access("A3"."RUN_ID"=:B1 AND "A3"."COMPANY"=:B2 AND "A3"."PAYGROUP"=:B3 AND "A3"."PAY_END_DT"=:B4)
       5 - access("B3"."EMPLID"=:B1 AND "B3"."COMPANY"=:B2 AND "B3"."PAYGROUP"=:B3 AND "B3"."PAY_END_DT"=:B4)
       8 - access("A1"."PAY_SYSTEM"="B1"."PAY_SYSTEM" AND SYS_OP_UNDESCEND(SYS_OP_DESCEND("PAYROLL_REQ_NUM"))="B1
                  "."PAYROLL_REQ_NUM" AND SYS_OP_DESCEND("PAYROLL_REQ_NUM")=SYS_OP_DESCEND("B1"."PAYROLL_REQ_NUM"))
       9 - access("A1"."RUN_ID"=:B1)
      11 - access("B1"."EMPLID"=:B1)
      16 - filter(("B2"."SEQ_NBR"="SEQ_NBR" OR "B2"."SEQ_NBR"=TO_NUMBER(SUBSTR("RESOURCE_ID",-13,12))) AND
                  "B2"."DUR"="TRANS_DT")
      17 - access("B2"."EMPLID"="EMPLID")
           filter("B2"."EMPLID"=:B1)
      18 - access("A2"."RUN_ID"=:B1 AND "A2"."PAY_SYSTEM"="B2"."PAY_SYSTEM" AND
                  SYS_OP_DESCEND("PAYROLL_REQ_NUM")=SYS_OP_DESCEND("B2"."PAYROLL_REQ_NUM"))
           filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("PAYROLL_REQ_NUM"))="B2"."PAYROLL_REQ_NUM")
      21 - access("A"."RUN_ID"='13CK0823BA')
      22 - access("A"."COMPANY"="B"."COMPANY" AND "A"."PAYGROUP"="B"."PAYGROUP" AND
                  "A"."PAY_END_DT"="B"."PAY_END_DT")
    Remote SQL Information (identified by operation id):
      15 - SELECT /*+ USE_NL ("PS_PROJ_RESOURCE") */ "RESOURCE_ID","ANALYSIS_TYPE","TRANS_DT","FOREIGN_AMOUNT","E
            MPLID","SEQ_NBR" FROM "SYSADM"."PS_PROJ_RESOURCE" "PS_PROJ_RESOURCE" WHERE "EMPLID"=:1 AND
            "ANALYSIS_TYPE"='TLB' (accessing 'FSLINK' )
    57 rows selected.

    Kindly find the actual plan.
    SQL Monitoring Report
    SQL Text
    SELECT /* sqlt_s31029 */ DISTINCT '13ck0823ba' , ' ' , B.EMPLID , NVL(( SELECT SUM(B3.TOTAL_GROSS) FROM SYSADM.PS_PAY_CALENDAR A3 , SYSADM.PS_PAY_CHECK B3 WHERE A3.RUN_ID = A.RUN_ID AND B3.EMPLID = B.EMPLID AND B3.COMPANY = B.COMPANY AND B3.PAYGROUP = B.PAYGROUP AND B3.PAY_END_DT = B.PAY_END_DT AND A3.COMPANY = B.COMPANY AND A3.PAYGROUP = B.PAYGROUP AND A3.PAY_END_DT = B.PAY_END_DT ),0), 0, NVL( ( SELECT SUM(B1.LBR_DIST_AMT) FROM SYSADM.PS_PY_LDTL_TBL A1 , SYSADM.PS_TL_PAYABLE_TIME B1 WHERE
    A1.RUN_ID = A.RUN_ID AND B1.EMPLID = B.EMPLID AND A1.PAY_SYSTEM = B1.PAY_SYSTEM AND A1.PAYROLL_REQ_NUM = B1.PAYROLL_REQ_NUM ),0)AS TL_PAY_AMT, 0, NVL( ( SELECT /*+ USE_NL(B2 C2) */ SUM(C2.OI_FOREIGN_AMT) FROM SYSADM.PS_PY_LDTL_TBL A2 , SYSADM.PS_TL_PAYABLE_TIME B2 , SYSADM.PS_OI_PRJ_RESOURCE C2 WHERE A2.RUN_ID = A.RUN_ID AND B2.EMPLID = B.EMPLID AND A2.PAY_SYSTEM = B2.PAY_SYSTEM AND A2.PAYROLL_REQ_NUM = B2.PAYROLL_REQ_NUM AND B2.EMPLID = C2.EMPLID AND ( B2.SEQ_NBR = C2.SEQ_NBR OR B2.SEQ_NBR =
    SUBSTR( C2.RESOURCE_ID,-13,12)) AND B2.DUR = C2.TRANS_DT AND C2.ANALYSIS_TYPE = 'TLB' ),0) AS TLB_PAY,0,0,0 FROM SYSADM.PS_PAY_CALENDAR A, SYSADM.PS_PAY_CHECK B WHERE A.RUN_ID = '13CK0823BA' AND A.COMPANY = B.COMPANY AND A.PAYGROUP = B.PAYGROUP AND A.PAY_END_DT = B.PAY_END_DT
    Global Information
    Status              :  DONE (ALL ROWS)
    Instance ID         :  1
    Session             :  SYS (594:719)
    SQL ID              :  7kw0g9wd8456b
    SQL Execution ID    :  16777216
    Execution Started   :  09/18/2013 03:35:47
    First Refresh Time  :  09/18/2013 03:36:02
    Last Refresh Time   :  09/18/2013 07:04:57
    Duration            :  12550s
    Module/Action       :  sqltxadmin.sqlt$a (xecute)/31029 41 ALTER SESSION SET EVENT
    Service             :  SYS$USERS
    Program             :  [email protected] (TNS V1-V3
    Fetch Calls         :  143
    Global Stats
    ====================================================================================================
    | Elapsed |   Cpu   |    IO    | Concurrency | Cluster  |  Other   | Fetch | Buffer | Read | Read  |
    | Time(s) | Time(s) | Waits(s) |  Waits(s)   | Waits(s) | Waits(s) | Calls |  Gets  | Reqs | Bytes |
    ====================================================================================================
    |   12550 |    6451 |     1079 |        0.01 |     2.61 |     5018 |   143 |     2G | 206K |   2GB |
    ====================================================================================================
    SQL Plan Monitoring Details (Plan Hash Value=298818496)
    ================================================================================================================================================================================================
    | Id |            Operation             |        Name        |  Rows   | Cost |   Time    | Start  | Execs |   Rows   | Read  | Read  |  Mem  | Activity |           Activity Detail           |
    |    |                                  |                    | (Estim) |      | Active(s) | Active |       | (Actual) | Reqs  | Bytes | (Max) |   (%)    |             (# samples)             |
    ================================================================================================================================================================================================
    |  0 | SELECT STATEMENT                 |                    |         |      |     12536 |    +15 |  2125 |     2125 |       |       |       |          |                                     |
    |  1 |   SORT AGGREGATE                 |                    |       1 |      |     12536 |    +15 |  2125 |     2125 |       |       |       |          |                                     |
    |  2 |    NESTED LOOPS                  |                    |         |      |     12536 |    +15 |  2125 |     2163 |       |       |       |          |                                     |
    |  3 |     NESTED LOOPS                 |                    |       1 |    4 |     12536 |    +15 |  2125 |     2163 |       |       |       |          |                                     |
    |  4 |      INDEX RANGE SCAN            | PS0PAY_CALENDAR    |       1 |    1 |     12536 |    +15 |  2125 |     2125 |       |       |       |          |                                     |
    |  5 |      INDEX RANGE SCAN            | PS1PAY_CHECK       |       1 |    2 |     12536 |    +15 |  2125 |     2163 |  1575 |  12MB |       |     0.01 | db file sequential read (1)         |
    |  6 |     TABLE ACCESS BY INDEX ROWID  | PS_PAY_CHECK       |       1 |    3 |     12536 |    +15 |  2163 |     2163 |    78 | 624KB |       |          |                                     |
    |  7 |   SORT AGGREGATE                 |                    |       1 |      |     12536 |    +15 |  2124 |     2124 |       |       |       |          |                                     |
    |  8 |    HASH JOIN                     |                    |      11 |  151 |     12536 |    +15 |  2124 |    29600 |       |       |    1M |          |                                     |
    |  9 |     INDEX RANGE SCAN             | PS0PY_LDTL_TBL     |      10 |    2 |     12536 |    +15 |  2124 |    70092 |       |       |       |          |                                     |
    | 10 |     TABLE ACCESS BY INDEX ROWID  | PS_TL_PAYABLE_TIME |     953 |  148 |     12550 |     +1 |  2124 |       3M |  192K |   1GB |       |     0.90 | Cpu (2)                             |
    |    |                                  |                    |         |      |           |        |       |          |       |       |       |          | db file sequential read (111)       |
    | 11 |      INDEX RANGE SCAN            | IDX$$_49B90004     |     953 |    5 |     12551 |     +0 |  2124 |       3M | 11273 |  88MB |       |     0.06 | db file sequential read (8)         |
    | 12 |   SORT AGGREGATE                 |                    |       1 |      |     12536 |    +15 |  2124 |     2124 |       |       |       |          |                                     |
    | 13 |    NESTED LOOPS                  |                    |       1 |   79 |     12536 |    +15 |  2124 |    33990 |       |       |       |          |                                     |
    | 14 |     NESTED LOOPS                 |                    |       1 |   78 |     12536 |    +15 |  2124 |       3M |       |       |       |          |                                     |
    | 15 |      REMOTE                      | PS_PROJ_RESOURCE   |      18 |    6 |     12547 |     +4 |  2124 |       3M |       |       |       |     4.13 | Cpu (1)                             |
    |    |                                  |                    |         |      |           |        |       |          |       |       |       |          | SQL*Net message from dblink (58)    |
    |    |                                  |                    |         |      |           |        |       |          |       |       |       |          | SQL*Net more data from dblink (459) |
    | 16 |      TABLE ACCESS BY INDEX ROWID | PS_TL_PAYABLE_TIME |       1 |    4 |     12539 |    +12 |    3M |       3M |       |       |       |     2.14 | Cpu (268)                           |
    | 17 |       INDEX RANGE SCAN           | IDX$$_49B90004     |       1 |    3 |     12536 |    +15 |    3M |       4G |       |       |       |     0.48 | Cpu (60)                            |
    | 18 |     INDEX RANGE SCAN             | PS0PY_LDTL_TBL     |       1 |    1 |     12536 |    +15 |    3M |    33990 |       |       |       |     0.01 | Cpu (1)                             |
    | 19 |   HASH UNIQUE                    |                    |     354 |    7 |     12536 |    +15 |     1 |     2117 |       |       |    1M |          |                                     |
    | 20 |    NESTED LOOPS                  |                    |     354 |    6 |     12536 |    +15 |     1 |     2147 |       |       |       |          |                                     |
    | 21 |     INDEX RANGE SCAN             | PS0PAY_CALENDAR    |       3 |    2 |     12536 |    +15 |     1 |        7 |       |       |       |          |                                     |
    | 22 |     INDEX RANGE SCAN             | PSEPAY_CHECK       |     103 |    2 |     12536 |    +15 |     7 |     2147 |    70 | 560KB |       |          |                                     |
    ================================================================================================================================================================================================

  • Problems with 11G RAC

    Hi,
    we have a production database now in 11g (11.1.0.7) with RAC (2 nodes). We have migrated from 10g single instance. The migration was clear, with new hardware and with data pumps. All works better than before, except some queries, one of these queries only have about 200 rows, and in the 10g system expended about 4 seconds. Now expends 3 or 4 or 8 seconds, but sometimes expends 34 seconds or 1 minute, is really extrange. The example query is executed over tables that are frecuently updated.
    When expend 4 seconds:
    SQL Text
    select SIN1COD, SIN1ANO, GES1COD, SINCNRC, GAB2COD, A.TIG3COD, ODG2COD, ODG2CO1, GESDPET, GESDREC, GESDMAX, CIA2COD, (SELECT COUNT(*) FROM CAPREC WHERE A.SIN3COD = CAPREC.SIN3COD
    AND A.SIN3ANO = CAPREC.SIN3ANO AND A.TIG3COD=CAPREC.TIG3COD AND A.GES1COD = CAPREC.GES3COD) as CUENTA, (case tig3cod when 'AVA' then (select AVANRES from CAPAVA ava where
    ava.sin3cod=a.sin3cod and ava.sin3ano=a.sin3ano and ava.ges3cod=a.ges1cod) else null end) AVANRES, SINBCCA,PERCNOM, GESCOTR as XXXCRES , (select min( ttacdes ) from
    captta,captar,capcyt where capcyt.tar3cod = captar.tar1cod and captta.tta1cod = captar.tta2cod and cia3cod=capsin.cia2cod and tarbval='true' ) tipotarifa, (select count( distinct
    ttacdes ) from captta,captar,capcyt where capcyt.tar3cod = captar.tar1cod and captta.tta1cod = captar.tta2cod and cia3cod=capsin.cia2cod and tarbval='true' ) cuentatipotarifa from
    CAPSIN, CAPGES A,CAPPER where CAPSIN.TRA2COD=CAPPER.PER1COD and CAPSIN.TRA2COD= :1 and CAPSIN.SIN1COD=A.SIN3COD and CAPSIN.SIN1ANO=A.SIN3ANO and GESDREC is not null and GESBEST is
    null order by GESDREC
    Global Information
    Status : DONE (ALL ROWS)
    Instance ID : 2
    Session ID : 439
    SQL ID : 3ahrv695tm5yd
    SQL Execution ID : 33566537
    Plan Hash Value : 599533631
    Execution Started : 05/22/2009 10:50:09
    First Refresh Time : 05/22/2009 10:50:13
    Last Refresh Time : 05/22/2009 10:50:13
    | Elapsed | Cpu | IO | Concurrency | Cluster | Other | Fetch | Buffer | Reads |
    | Time(s) | Time(s) | Waits(s) | Waits(s) | Waits(s) | Waits(s) | Calls | Gets | |
    | 3.89 | 0.47 | 3.15 | 0.00 | 0.21 | 0.05 | 5 | 85732 | 670 |
    SQL Plan Monitoring Details
    ==========================================================================================================================================================================
    | Id | Operation | Name | Rows | Cost | Time | Start | Starts | Rows | Memory | Activity | Activity Detail |
    | | | | (Estim) | | Active(s) | Active | | (Actual) | (Max) | (percent) | (sample #) |
    ==========================================================================================================================================================================
    | 0 | SELECT STATEMENT | | | 21968 | 1 | +4 | 43 | 43 | | | |
    | 1 | SORT AGGREGATE | | 1 | | 1 | +4 | 43 | 43 | | | |
    | 2 | INDEX RANGE SCAN | CAPRECP1 | 1 | 3 | 1 | +4 | 43 | 20 | | | |
    | 3 | TABLE ACCESS BY INDEX ROWID | CAPAVA | 1 | 4 | 1 | +4 | 1 | 1 | | | |
    | 4 | INDEX RANGE SCAN | CAPAVAP1 | 1 | 3 | 1 | +4 | 1 | 1 | | | |
    | 5 | SORT AGGREGATE | | 1 | | 1 | +4 | 7 | 7 | | | |
    | 6 | HASH JOIN | | 23 | 9 | 1 | +4 | 7 | 141 | 961K | | |
    | 7 | HASH JOIN | | 23 | 6 | 1 | +4 | 7 | 142 | 1587K | | |
    | 8 | INDEX RANGE SCAN | CAPCYT_I4 | 23 | 2 | 1 | +4 | 7 | 174 | | | |
    | 9 | TABLE ACCESS FULL | CAPTAR | 215 | 3 | 1 | +4 | 7 | 1505 | | | |
    | 10 | VIEW | index$_join$_003 | 5 | 3 | 1 | +4 | 7 | 35 | | | |
    | 11 | HASH JOIN | | | | 1 | +4 | 7 | 35 | 519K | | |
    | 12 | INDEX FAST FULL SCAN | CAPTTAP1 | 5 | 1 | 1 | +4 | 7 | 35 | | | |
    | 13 | INDEX FAST FULL SCAN | IDX$$_00010008 | 5 | 1 | 1 | +4 | 7 | 35 | | | |
    | 14 | SORT GROUP BY | | 1 | | 1 | +4 | 7 | 7 | 2048 | | |
    | 15 | HASH JOIN | | 23 | 9 | 1 | +4 | 7 | 141 | 939K | | |
    | 16 | HASH JOIN | | 23 | 6 | 1 | +4 | 7 | 142 | 1587K | | |
    | 17 | INDEX RANGE SCAN | CAPCYT_I4 | 23 | 2 | 1 | +4 | 7 | 174 | | | |
    | 18 | TABLE ACCESS FULL | CAPTAR | 215 | 3 | 1 | +4 | 7 | 1505 | | | |
    | 19 | VIEW | index$_join$_006 | 5 | 3 | 1 | +4 | 7 | 35 | | | |
    | 20 | HASH JOIN | | | | 1 | +4 | 7 | 35 | 520K | | |
    | 21 | INDEX FAST FULL SCAN | CAPTTAP1 | 5 | 1 | 1 | +4 | 7 | 35 | | | |
    | 22 | INDEX FAST FULL SCAN | IDX$$_00010008 | 5 | 1 | 1 | +4 | 7 | 35 | | | |
    | 23 | SORT ORDER BY | | 4281 | 21968 | 1 | +4 | 1 | 43 | 40960 | | |
    | 24 | HASH JOIN | | 4281 | 21690 | 1 | +4 | 1 | 43 | 1436K | | |
    | 25 | NESTED LOOPS | | 4165 | 1673 | 1 | +4 | 1 | 2964 | | | |
    | 26 | TABLE ACCESS BY INDEX ROWID | CAPPER | 1 | 1 | 1 | +4 | 1 | 1 | | | |
    | 27 | INDEX UNIQUE SCAN | CAPPERP1 | 1 | 0 | 1 | +4 | 1 | 1 | | | |
    | 28 | TABLE ACCESS FULL | CAPSIN | 4165 | 1672 | 1 | +4 | 1 | 2964 | | | |
    | 29 | TABLE ACCESS FULL | CAPGES | 10166 | 20016 | 3 | +2 | 1 | 1523 | | 100.00 | Cpu (1) |
    | | | | | | | | | | | | db file sequential read (1) |
    | | | | | | | | | | | | read by other session (1) |
    ==========================================================================================================================================================================
    In the same node when expend 30 s.
    SQL Text
    select SIN1COD, SIN1ANO, GES1COD, SINCNRC, GAB2COD, A.TIG3COD, ODG2COD, ODG2CO1, GESDPET, GESDREC, GESDMAX, CIA2COD, (SELECT COUNT(*) FROM CAPREC WHERE A.SIN3COD = CAPREC.SIN3COD
    AND A.SIN3ANO = CAPREC.SIN3ANO AND A.TIG3COD=CAPREC.TIG3COD AND A.GES1COD = CAPREC.GES3COD) as CUENTA, (case tig3cod when 'AVA' then (select AVANRES from CAPAVA ava where
    ava.sin3cod=a.sin3cod and ava.sin3ano=a.sin3ano and ava.ges3cod=a.ges1cod) else null end) AVANRES, SINBCCA,PERCNOM, GESCOTR as XXXCRES , (select min( ttacdes ) from
    captta,captar,capcyt where capcyt.tar3cod = captar.tar1cod and captta.tta1cod = captar.tta2cod and cia3cod=capsin.cia2cod and tarbval='true' ) tipotarifa, (select count( distinct
    ttacdes ) from captta,captar,capcyt where capcyt.tar3cod = captar.tar1cod and captta.tta1cod = captar.tta2cod and cia3cod=capsin.cia2cod and tarbval='true' ) cuentatipotarifa from
    CAPSIN, CAPGES A,CAPPER where CAPSIN.TRA2COD=CAPPER.PER1COD and CAPSIN.TRA2COD= :1 and CAPSIN.SIN1COD=A.SIN3COD and CAPSIN.SIN1ANO=A.SIN3ANO and GESDREC is not null and GESBEST is
    null order by GESDREC
    Global Information
    Status : DONE (ALL ROWS)
    Instance ID : 2
    Session ID : 465
    SQL ID : 3ahrv695tm5yd
    SQL Execution ID : 33566581
    Plan Hash Value : 599533631
    Execution Started : 05/22/2009 11:17:44
    First Refresh Time : 05/22/2009 11:17:50
    Last Refresh Time : 05/22/2009 11:18:17
    | Elapsed | Cpu | IO | Concurrency | Cluster | Other | Fetch | Buffer | Reads |
    | Time(s) | Time(s) | Waits(s) | Waits(s) | Waits(s) | Waits(s) | Calls | Gets | |
    | 32 | 0.45 | 30 | 0.00 | 1.40 | 0.39 | 3 | 85565 | 4023 |
    SQL Plan Monitoring Details
    ===========================================================================================================================================================================
    | Id | Operation | Name | Rows | Cost | Time | Start | Starts | Rows | Memory | Activity | Activity Detail |
    | | | | (Estim) | | Active(s) | Active | | (Actual) | (Max) | (percent) | (sample #) |
    ===========================================================================================================================================================================
    | 0 | SELECT STATEMENT | | | 21968 | 9 | +25 | 26 | 26 | | | |
    | 1 | SORT AGGREGATE | | 1 | | 9 | +25 | 26 | 26 | | | |
    | 2 | INDEX RANGE SCAN | CAPRECP1 | 1 | 3 | 1 | +33 | 26 | 1 | | | |
    | 3 | TABLE ACCESS BY INDEX ROWID | CAPAVA | 1 | 4 | 9 | +25 | 4 | 4 | | | |
    | 4 | INDEX RANGE SCAN | CAPAVAP1 | 1 | 3 | 9 | +25 | 4 | 4 | | | |
    | 5 | SORT AGGREGATE | | 1 | | 1 | +25 | 2 | 2 | | | |
    | 6 | HASH JOIN | | 23 | 9 | 1 | +25 | 2 | 17 | 726K | | |
    | 7 | HASH JOIN | | 23 | 6 | 1 | +25 | 2 | 17 | 1585K | | |
    | 8 | INDEX RANGE SCAN | CAPCYT_I4 | 23 | 2 | 1 | +25 | 2 | 21 | | | |
    | 9 | TABLE ACCESS FULL | CAPTAR | 215 | 3 | 1 | +25 | 2 | 430 | | | |
    | 10 | VIEW | index$_join$_003 | 5 | 3 | 1 | +25 | 2 | 10 | | | |
    | 11 | HASH JOIN | | | | 1 | +25 | 2 | 10 | 518K | | |
    | 12 | INDEX FAST FULL SCAN | CAPTTAP1 | 5 | 1 | 1 | +25 | 2 | 10 | | | |
    | 13 | INDEX FAST FULL SCAN | IDX$$_00010008 | 5 | 1 | 1 | +25 | 2 | 10 | | | |
    | 14 | SORT GROUP BY | | 1 | | 1 | +25 | 2 | 2 | 2048 | | |
    | 15 | HASH JOIN | | 23 | 9 | 1 | +25 | 2 | 17 | 716K | | |
    | 16 | HASH JOIN | | 23 | 6 | 1 | +25 | 2 | 17 | 1587K | | |
    | 17 | INDEX RANGE SCAN | CAPCYT_I4 | 23 | 2 | 1 | +25 | 2 | 21 | | | |
    | 18 | TABLE ACCESS FULL | CAPTAR | 215 | 3 | 1 | +25 | 2 | 430 | | | |
    | 19 | VIEW | index$_join$_006 | 5 | 3 | 1 | +25 | 2 | 10 | | | |
    | 20 | HASH JOIN | | | | 1 | +25 | 2 | 10 | 520K | | |
    | 21 | INDEX FAST FULL SCAN | CAPTTAP1 | 5 | 1 | 1 | +25 | 2 | 10 | | | |
    | 22 | INDEX FAST FULL SCAN | IDX$$_00010008 | 5 | 1 | 1 | +25 | 2 | 10 | | | |
    | 23 | SORT ORDER BY | | 4281 | 21968 | 9 | +25 | 1 | 26 | 24576 | | |
    | 24 | HASH JOIN | | 4281 | 21690 | 28 | +6 | 1 | 26 | 1280K | | |
    | 25 | NESTED LOOPS | | 4165 | 1673 | 1 | +6 | 1 | 689 | | | |
    | 26 | TABLE ACCESS BY INDEX ROWID | CAPPER | 1 | 1 | 1 | +6 | 1 | 1 | | | |
    | 27 | INDEX UNIQUE SCAN | CAPPERP1 | 1 | 0 | 1 | +6 | 1 | 1 | | | |
    | 28 | TABLE ACCESS FULL | CAPSIN | 4165 | 1672 | 1 | +6 | 1 | 689 | | | |
    | 29 | TABLE ACCESS FULL | CAPGES | 10166 | 20016 | 32 | +2 | 1 | 1476 | | 100.00 | gc buffer busy acquire (3) |
    | | | | | | | | | | | | Cpu (2) |
    | | | | | | | | | | | | db file scattered read (4) |
    | | | | | | | | | | | | db file sequential read (10) |
    | | | | | | | | | | | | read by other session (13) |
    ===========================================================================================================================================================================
    And when expends 1,4 minutes in the other node
    SQL Text
    select SIN1COD, SIN1ANO, GES1COD, SINCNRC, GAB2COD, A.TIG3COD, ODG2COD, ODG2CO1, GESDPET, GESDREC, GESDMAX, CIA2COD, (SELECT COUNT(*) FROM CAPREC WHERE A.SIN3COD = CAPREC.SIN3COD
    AND A.SIN3ANO = CAPREC.SIN3ANO AND A.TIG3COD=CAPREC.TIG3COD AND A.GES1COD = CAPREC.GES3COD) as CUENTA, (case tig3cod when 'AVA' then (select AVANRES from CAPAVA ava where
    ava.sin3cod=a.sin3cod and ava.sin3ano=a.sin3ano and ava.ges3cod=a.ges1cod) else null end) AVANRES, SINBCCA,PERCNOM, GESCOTR as XXXCRES , (select min( ttacdes ) from
    captta,captar,capcyt where capcyt.tar3cod = captar.tar1cod and captta.tta1cod = captar.tta2cod and cia3cod=capsin.cia2cod and tarbval='true' ) tipotarifa, (select count( distinct
    ttacdes ) from captta,captar,capcyt where capcyt.tar3cod = captar.tar1cod and captta.tta1cod = captar.tta2cod and cia3cod=capsin.cia2cod and tarbval='true' ) cuentatipotarifa from
    CAPSIN, CAPGES A,CAPPER where CAPSIN.TRA2COD=CAPPER.PER1COD and CAPSIN.TRA2COD= :1 and CAPSIN.SIN1COD=A.SIN3COD and CAPSIN.SIN1ANO=A.SIN3ANO and GESDREC is not null and GESBEST is
    null order by GESDREC
    Global Information
    Status : DONE (ALL ROWS)
    Instance ID : 1
    Session ID : 447
    SQL ID : 3ahrv695tm5yd
    SQL Execution ID : 16788142
    Plan Hash Value : 599533631
    Execution Started : 05/22/2009 11:45:50
    First Refresh Time : 05/22/2009 11:45:54
    Last Refresh Time : 05/22/2009 11:47:17
    | Elapsed | Cpu | IO | Concurrency | Cluster | Other | Fetch | Buffer | Reads |
    | Time(s) | Time(s) | Waits(s) | Waits(s) | Waits(s) | Waits(s) | Calls | Gets | |
    | 87 | 0.92 | 82 | 0.00 | 3.24 | 0.82 | 8 | 85810 | 14921 |
    SQL Plan Monitoring Details
    ===========================================================================================================================================================================
    | Id | Operation | Name | Rows | Cost | Time | Start | Starts | Rows | Memory | Activity | Activity Detail |
    | | | | (Estim) | | Active(s) | Active | | (Actual) | (Max) | (percent) | (sample #) |
    ===========================================================================================================================================================================
    | 0 | SELECT STATEMENT | | | 22346 | 42 | +46 | 72 | 72 | | | |
    | 1 | SORT AGGREGATE | | 1 | | 42 | +46 | 72 | 72 | | | |
    | 2 | INDEX RANGE SCAN | CAPRECP1 | 1 | 3 | 35 | +46 | 72 | 40 | | | |
    | 3 | TABLE ACCESS BY INDEX ROWID | CAPAVA | 1 | 4 | 42 | +46 | 24 | 24 | | | |
    | 4 | INDEX RANGE SCAN | CAPAVAP1 | 1 | 3 | 42 | +46 | 24 | 24 | | | |
    | 5 | SORT AGGREGATE | | 1 | | 37 | +46 | 5 | 5 | | | |
    | 6 | HASH JOIN | | 23 | 9 | 37 | +46 | 5 | 142 | 961K | | |
    | 7 | HASH JOIN | | 23 | 6 | 37 | +46 | 5 | 143 | 1586K | | |
    | 8 | INDEX RANGE SCAN | CAPCYT_I4 | 23 | 2 | 37 | +46 | 5 | 193 | | | |
    | 9 | TABLE ACCESS FULL | CAPTAR | 215 | 3 | 37 | +46 | 5 | 1075 | | | |
    | 10 | VIEW | index$_join$_003 | 5 | 3 | 37 | +46 | 5 | 25 | | | |
    | 11 | HASH JOIN | | | | 37 | +46 | 5 | 25 | 519K | | |
    | 12 | INDEX FAST FULL SCAN | CAPTTAP1 | 5 | 1 | 37 | +46 | 5 | 25 | | | |
    | 13 | INDEX FAST FULL SCAN | IDX$$_00010008 | 5 | 1 | 37 | +46 | 5 | 25 | | | |
    | 14 | SORT GROUP BY | | 1 | | 37 | +46 | 5 | 5 | 2048 | | |
    | 15 | HASH JOIN | | 23 | 9 | 37 | +46 | 5 | 142 | 951K | | |
    | 16 | HASH JOIN | | 23 | 6 | 37 | +46 | 5 | 143 | 1587K | | |
    | 17 | INDEX RANGE SCAN | CAPCYT_I4 | 23 | 2 | 37 | +46 | 5 | 193 | | | |
    | 18 | TABLE ACCESS FULL | CAPTAR | 215 | 3 | 37 | +46 | 5 | 1075 | | | |
    | 19 | VIEW | index$_join$_006 | 5 | 3 | 37 | +46 | 5 | 25 | | | |
    | 20 | HASH JOIN | | | | 37 | +46 | 5 | 25 | 520K | | |
    | 21 | INDEX FAST FULL SCAN | CAPTTAP1 | 5 | 1 | 37 | +46 | 5 | 25 | | | |
    | 22 | INDEX FAST FULL SCAN | IDX$$_00010008 | 5 | 1 | 37 | +46 | 5 | 25 | | | |
    | 23 | SORT ORDER BY | | 10166 | 22346 | 42 | +46 | 1 | 72 | 55296 | | |
    | 24 | HASH JOIN | | 10166 | 21690 | 84 | +4 | 1 | 72 | 1550K | | |
    | 25 | NESTED LOOPS | | 22970 | 1674 | 1 | +4 | 1 | 6745 | | | |
    | 26 | TABLE ACCESS BY INDEX ROWID | CAPPER | 1 | 1 | 1 | +4 | 1 | 1 | | | |
    | 27 | INDEX UNIQUE SCAN | CAPPERP1 | 1 | 0 | 1 | +4 | 1 | 1 | | | |
    | 28 | TABLE ACCESS FULL | CAPSIN | 22970 | 1673 | 1 | +4 | 1 | 6745 | | | |
    | 29 | TABLE ACCESS FULL | CAPGES | 10166 | 20016 | 86 | +2 | 1 | 1379 | | 100.00 | gc buffer busy acquire (5) |
    | | | | | | | | | | | | Cpu (3) |
    | | | | | | | | | | | | db file scattered read (22) |
    | | | | | | | | | | | | db file sequential read (14) |
    | | | | | | | | | | | | read by other session (41) |
    ===========================================================================================================================================================================
    Anyone can help me?,
    Regards
    Luis

    Satish Kandi wrote:
    What are the instance level parameters for both nodes? Is there any difference in them?The instances have the same parameters except minimal diffrences in the SGA and PGA. I guess it's due to the different size of phisical memory in the servers.
    >
    Two queries should a difference in number of rows that are output. Is this correct?Yes, the tables of this query have a lot of inserts/updates in a minute, then is correct a bit different result in different executions of the same query. In any case, the number of rows seems not to be important in response time.
    Luis

  • Value based permits

    Hi Every one,
    I want to know that is there any possiblity at permits level like value base
    For Exapmle
    If the cost of order is blow 50,000 then this permit will be aproved by person X
    and when cost of order increases above 50,000 then permit will be aproved by person Y
    I hope I m clear in my question
    looking forward for response

    hi iftikhar,
    1.create ct04[characteristic]and maintain values 10k,20kof some range if your going to call permits on planning cost here in additional tab mention the table[CSEVPERMIT] & any field names
    ILART-Maintenance activity type
    PKOSTEN for planning cost
    USER4 for estimated cost
    IKOSTEN for actual cost.
    2.Create permit class and put the charc in permit class and for class type 049 maintain classification status in IMG.[Cross application components--> classification system->classes---->maintain object types and object keys(here plz read the note and maintain status for class type 049).
    3.Create permits using IPMD and put category , order status and goto classification and maintain permit class and select particular charc value for that permit.
    By the above process respective permits [assume that you have given based on planned cost of the order]get automatically assigned to the order,now you can maintain authorisation for the permit.
    Hope this might have met you requirement.
    Plz try the same and let me know if you have any querries or no .If working give up points'''
    regards
    pushpa

  • Plant Maintenance_Goods Issue to Maintenance Order

    Dear Experts,
    Can you please suggest me how to map the following process in SAP PM.
    1.     Mostly Engineers assigned to Maintenance raises MRN (Material Requisition Note) to Engineering Warehouse.
    2.     Damage Items are returned as engineering scrap.
    3.     Based on MRN, spare parts are issued. ( For high value item over 65,000 INR , General Manger/Director Technical approval is required)
    Thanks&Regards;
    TRB

    Hi,
         Please check the below :
    Approval of orders based on permits.....
    "This method is used to automatically assign permits to MO based on maintenance activity types/planned cost of orders/actual cost of orders/estimated cost of orders....."
    1.create ct04characteristicand maintain values or value ranges 10k-20k,30k-to40k of some range if your going to call permits on planning cost here in additional tab mention the tableCSEVPERMIT & any field names
    ILART-Maintenance activity type
    PKOSTEN for planning cost
    USER4 for estimated cost
    IKOSTEN for actual cost.
    In Addtional data tab : Select Not ready for Input option .
    2.Create permit class and put the charc in permit class and for class type 049 maintain classification status in IMG.[Cross application components--> classification system->classes---->maintain object types and object keys(here plz read the note and maintain status for class type 049).
    3.Create permits using IPMD and put category , order status and goto classification and maintain permit class and select particular charc value for that permit.
    By the above process respective permits assume that you have given based on planned cost of the order get automatically assigned to the order,now you can maintain authorisation for the permit.Use eqpts which dont have permits and try this method......
    Hope this might have met you requirement.
    regards
    pushpa

  • Photo to Movie Slideshow compression problems

    Hello!
    I am trying to compress a slideshow that has come out of a program called Photo-To-Movie for DVD. But the quality is not good when i have motion in the frame inspite of all different bit-rate, vbr, field order, motion estimation setting variations.
    Actually the motion is not so flickery on TV, but it should be viewable on a computer screen also. I notice that the flicker is worse when the motion is vertical.
    Photo-to-Movie has Full Quality DV (NTSC) setting on, so the picture coming out of there is top-notch. Seen through a Quicktime player the slideshow is also alright.
    Does anyone has any suggestion what to try more?
    I use latest Compressor and DVD studio pro and Photo to movie.
    Thanks in advance!
    Timo

    Try a flicker filter in FCP or a blur deinterlace in Compressor. A blur deinterlace filter followed by a mild edge sharpening may be all you'll need (try a setting of 5 to 10 for the edge sharpening filter).<small><hr width="75%"><small>If this suggestion helps in any way, a confirmation or acknowledgment would be appreciated, since that would also help others who may be having the same difficulty. Do for others as you would have them help you.<center>Thanks for sharing, Waymen.</center></small>

  • Max_server_memory affecting plan.

    Hello,
    I am experimenting on TPCH 10-GB data, and I came across following :
    Keeping Max_server_memory=128MB, the plan chosen by the optimizer involves Nested loop join.
    Keeping Max_server_memory=4096MB, the plan chosen by the optimizer involves Hash Match join.
    Can, you explain me how changing max_server_memory is affecting the choice of plan, one more thing to specify is that, I am talking about estimated execution plan only, i.e. these mention plans are estimated plans and not actual plan.
    Looking forward to some helpful explanation!

    Max server memory setting affects total memory consumed by Buffer pool not just Plan cache and other caches.But keeping max server memroy to 128 MB is BLUNDER and SQL server would freeze at some point of time due to memory crunch
    Second option of keeping max server memory to 4 G seems reasonable.For all 8 KB pages required by plan memory is furnished from buffer pool and any pages greater than this will come from outside buffer pool.Plan cache is mainly influenced by query you wrote
    . If you wrote bad queries with lots of Hash joins or sorts it  will consume more memory for preparing query plan.If stats are outdated bad plan would be prepared which would ultimately affect query execution.Memory grants too influence query and for
    more you can read below article
    http://blogs.msdn.com/b/sqlqueryprocessing/archive/2010/02/16/understanding-sql-server-memory-grant.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Order release approval

    Dear
    Just have the idea about below one. We need the maintenance order approval based on plan cost.
    For this we created Class type 032. The created class is assigned there. In class we referred the PMCO table and value is above one dollar.
    Now the thing is how to make this effect in order level. Even i cant assign to the equipments,functional location. Also there is no standard t Code is available for order release like PR.
    Thenna

    hi all,
    find the solution for planned cost,maintenance acitivity types,etc
    1.create ct04characteristicand maintain values 10k,20kof some range if your going to call permits on planning cost here in additional tab mention the structure CSEVPERMIT & any field names
    ILART-Maintenance activity type
    PKOSTEN for planning cost
    USER4 for estimated cost
    IKOSTEN for actual cost.
    2.Create permit class and put the charc in permit class and for class type 049 maintain classification status in IMG.[Cross application components--> classification system->classes---->maintain object types and object keys(here plz read the note and maintain status for class type 049).
    3.Create permits using IPMD and put category , order status and goto classification and maintain permit class and select particular charc value for that permit.
    By the above process respective permits assume that you have given based on planned cost of the orderget automatically assigned to the order,now you can maintain authorisation for the permit for issuing
    Hope this might have met you requirement.
    Plz try the same and let me know if you have any querries or no .If working give up points'''
    regards
    pushpa

Maybe you are looking for