Explain plan : need advice in improving performance

Hi,
DB : 10.2.0.4
platform: Solaris
SGA: 8 G
one of my query is taking too much time, explain plan gives below output.
kindly advise what i can do to improve the performance
PLAN_TABLE_OUTPUT
Plan hash value: 430877948
| Id  | Operation                    | Name                          | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT             |                               |  8143 | 1081K| 31130   (1)| 00:06:14 |
|*  1 | FILTER | |       |       |            |          |
|*  2 | TABLE ACCESS BY INDEX ROWID| ID_TICKET_DETAILS             |  8143 | 1081K|   494   (0)| 00:00:06 |
|*  3 | INDEX SKIP SCAN           | TKT_IDX_21                    |     1 | |   493   (0)| 00:00:06 |
|*  4 | TABLE ACCESS BY INDEX ROWID| ID_DELIVERY_DEBIT_SLIP_DETAIL |     1 | 34 |     3   (0)| 00:00:01 |
|   5 | NESTED LOOPS              |                               |     2 | 124 |     7   (0)| 00:00:01 |
|*  6 | TABLE ACCESS FULL        | ID_DELIVERY_DEBIT_SLIP_HEADER | 32243 | 881K|     2   (0)| 00:00:01 |
|*  7 | INDEX RANGE SCAN         | DSD_DELIVERY_DEBIT_UKEY       |     1 | |     2   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - filter( NOT EXISTS (SELECT /*+ */ 0 FROM "ID_DELIVERY_DEBIT_SLIP_HEADER"
"ID_DELIVERY_DEBIT_SLIP_HEADER","ID_DELIVERY_DEBIT_SLIP_DETAIL" "ID_DELIVERY_DEBIT_SLIP_DETAIL" WHERE
"DSH_DOCUMENT_NUMBER"="DSD_DOCUMENT_NUMBER" AND "DSH_DOCUMENT_TYPE"="DSD_DOCUMENT_TYPE" AND
"DSH_COMPANY"="DSD_COMPANY" AND "DSD_TICKET_NUMBER" IS NOT NULL AND
LNNVL(:B1||:B2<>"DSD_AIRLINE"||"DSD_TICKET_NUMBER") AND "DSH_DELIVERY_DEBIT"='DEBIT'))
   2 - filter((:1 IS NULL OR "TICKET_AIRLINE"=:2) AND "TICKET_REFERENCE_2" IS NULL AND
"TICKET_RECEIPT_NUMBER" IS NULL AND "TICKET_CARD_RECEIPT_NUMBER" IS NULL AND
"TICKET_SYSTEM_DOC_NUMBER" IS NULL)
   3 - access("TICKET_REFERENCE_1" IS NULL)
       filter("TICKET_REFERENCE_1" IS NULL AND TO_NUMBER("TICKET_COMPANY")=1)
   4 - filter("DSD_TICKET_NUMBER" IS NOT NULL AND LNNVL(:B1||:B2<>"DSD_AIRLINE"||"DSD_TICKET_NUMBER"))
   6 - filter("DSH_DELIVERY_DEBIT"='DEBIT')
   7 - access("DSH_COMPANY"="DSD_COMPANY" AND "DSH_DOCUMENT_TYPE"="DSD_DOCUMENT_TYPE" AND
"DSH_DOCUMENT_NUMBER"="DSD_DOCUMENT_NUMBER")
Note
   - SQL profile "SYS_SQLPROF_014f902e2ea4c002" used for this statement

some comments:
it would be more simple to read the plan with indentatitions: you could use a fixed-width font
it's hard to tell much about the plan without seeing the corresponding query (though in this case the predicate section gives some information on the query - especially step 1)
the plan shows the use of a sql profile: so the CBO uses additional statistics to generate the plan
in step 3 there is an index skip scan: that's only a good idea if there are few distinct values for the leading column of the index and the selectivity of "TICKET_REFERENCE_1" IS NULL is good
in step 6 there is a Full Table Scan for the driving table of a nested loops join: the cost value for the scan is very small and so is the cost for the complete NL join - and that could be misleading
I would use the gather_plan_statistics hint to get a plan with rowsource statistics to check if the cardinalities the CBO works with are correct. If they are not you could try to disable the profile (or create a new profile; of course after checking who created the profile and for what reasons). With an accurate sql profile the CBO should have enough information to create an accurate plan in most cases.
Regards
Martin

Similar Messages

  • Need pointers to improve performance of a select query to table vbrk

    Hey Folks,
    I have a query , whose performance needs to be tuned , as such:
        SELECT a~vbeln
               a~fkart                    
               a~waerk
               a~fkdat                   
               b~posnr
               b~vgbel
               b~vgpos
               b~matnr
               b~arktx
               b~prctr
               b~txjcd
          INTO TABLE gi_billing_items
          FROM vbrk AS a
          INNER JOIN vbrp AS b
          ON a~vbeln = b~vbeln
          FOR ALL ENTRIES IN gi_sales_items
         WHERE b~vgbel = gi_sales_items-vbeln
           AND b~vgpos  = gi_sales_items-posnr
           AND b~matnr  = gi_sales_items-matnr
           AND b~werks  = gi_sales_items-werks.
    where
    gi_sales_items is an internal table consisting of 278 entries,.
    The result set collected in table gi_billing_items is 200 records
    The total execution time for this query for the afore given data is 72,983 ms with the average time/record being ~ 9,471 ms which is too high.
    When I try to verify the Explain Plan of the query in ST05, in the Access path I see that the performance of Query Block 1 is bad. Query Block 1 is of the QBLOCK_TYPE UNIONA. Its the very first step in the Query execution internally.
    The indexes are defined on participating tables VBRK and VBRP as:
    VBRK~0      MANDT,VBELN
    VBRK~LOC MANDT,LCNUM
    VBRP~0      MANDT,VBELN,POSNR
    VBRP~Z01   FPLNR,MANDT
    VBRP~Z02   MANDT,MATNR,WERKS
    Its clear from the ST05, STAD and SE30 traces that there is a performance issue in this query. Does anyone have any pointers as to how to resolve this issue? Is there a protocol one needs to follow when using the "FOR ALL ENTRIES IN" clause? Or is there a need for any secondary indexes to be created?
    Please let me know
    Thanks and Best Regards,
    Rashmi.

    Hi,
    Try using the VBFA...to get the Invoice number and line item..and then use that value in VBRK...
    * Declare the internal table for T_VBFA.
    IF NOT gi_sales_items[] IS INITIAL.
    SELECT VBELV
                  POSNV
                  VBELN
                  POSNN
                  VBTYP_N
                  INTO TABLE T_VBFA
                  FOR ALL ENTRIES IN gi_sales_items
                  WHERE VBELV = gi_sales_items-VBELN
                  AND       POSNV = gi_sales_items-POSNR
                  AND       VBTYP_N = 'M'.             "Invoice                       ""Added this..
    ENDIF.
    **Add two columns to GI_SALES_ITEMS..to store the VBELN POSNN the data from t_vbfa..let's assume it is VBELN_VF and POSNR_VF
    * Basically merge gi_sales_items AND t_vbfa
    ** Then use that field in
    IF NOT GI_SALES_ITEMS[] IS INITIAL.
          SELECT a~vbeln
               a~fkart                    
               a~waerk
               a~fkdat                   
               b~posnr
               b~vgbel
               b~vgpos
               b~matnr
               b~arktx
               b~prctr
               b~txjcd
          INTO TABLE gi_billing_items
          FROM vbrk AS a
          INNER JOIN vbrp AS b
          ON a~vbeln = b~vbeln
          FOR ALL ENTRIES IN gi_sales_items
          WHERE b~vbeln = gi_sales_items-vbeln_vf   " Change here
           AND b~posnr  = gi_sales_items-posnr_vf     " Change here
           AND b~matnr  = gi_sales_items-matnr
           AND b~werks  = gi_sales_items-werks.
    ENDIF.
    Thanks
    Naren
    Edited by: Narendran Muthukumaran on Oct 15, 2008 11:35 PM

  • Explain plan needs resize columns best-fit

    Is there an easy way to resize columns in the explain plan grid? They are difficult to resize if the values in them are long, especially the access and filter columns at the end.

    There is only one way to resize these right now (and thats the one you are using).

  • Need Advice IO and performance

    Dear DBA's
    I have objects which is having 10 partiotions which is day wise, each day it loads the data on corresponding date object, each partiotion i assigned each tablespace.
    in this objects it loads 6 to 7 million records each day.
    example :
    CREATE TABLE TEST (<COL. NAMES>)
    PARTITION( PARTITION T1 <CONDITION> TABLESPACE T1_TBS,
    PARTITION T2 <CONDITION> TABLESPACE T2 TBS,
    PARTITION T3 <CONDITION> TABLESPACE T3_TBS,
    PARTITION T4 <CONDITION> TABLESPACE T4_TBS,
    PARTITION T5 <CONDITION> TABLESPACE T5_TBS,
    My plan to change the above structure for that i need your advice.
    In above structure each object is taking 10 tablespaces.
    If i make it one tablespace instead of 10 tablespaces, is there any impact on IO or performance of the database?
    Regards,
    SG

    SG2 wrote:
    Dear DBA's
    I have objects which is having 10 partiotions which is day wise, each day it loads the data on corresponding date object, each partiotion i assigned each tablespace.
    in this objects it loads 6 to 7 million records each day.
    example :
    CREATE TABLE TEST (<COL. NAMES>)
    PARTITION( PARTITION T1 <CONDITION> TABLESPACE T1_TBS,
    PARTITION T2 <CONDITION> TABLESPACE T2 TBS,
    PARTITION T3 <CONDITION> TABLESPACE T3_TBS,
    PARTITION T4 <CONDITION> TABLESPACE T4_TBS,
    PARTITION T5 <CONDITION> TABLESPACE T5_TBS,
    My plan to change the above structure for that i need your advice.
    In above structure each object is taking 10 tablespaces.
    If i make it one tablespace instead of 10 tablespaces, is there any impact on IO or performance of the database?
    Which pizza has fewer calories; pizza uncut (1 peice) or pizza cut into 10 pieces?
    How does number of tablespaces change the amount of I/O operations to read whole table?

  • EP6 sp12 Performance Issue, Need help to improve performance

    We have a Portal development environment with EP6.0 sp12.
    What we are experiencing is performance issue, It's not extremely slow, but slow compared to normal ( compared to our prod box). For example, after putting the username and password and clicking the <Log on> Button it's taking more than 10 secs for the first home page to appear. Also currently we have hooked the Portal with 3 xAPPS system and one BW system. The time taken for a BW query to appear ( with selection screen) is also more than 10 secs. However access to one other xAPPS is comparatively faster.
    Do we have a simple to use guide( Not a very elaborate one) with step by step guidance to immediately improve the performance of the Portal.
    Simple guide, easy to implement,  with immediate effect is what we are looking for in the short term
    Thanks
    Arunabha

    Hi Eric,
      I have searched but didn't find the Portal Tuning and Optimization Guide as you have suggested, Can you help to find this.
    Subrato,
      This is good and I would obviously read through this, The issue here is this is only for Network.
      But do you know any other guide, which as very basic ( may be 10 steps) and show step by step the process, it would be very helpful. I already have some information from the thread Portal Performance - page loads slow, client cache reset/cleared too often
    But really looking for answer ( steps to do it quickly and effectively) instead of list of various guides.
    It would be very helpful if you or anybody( who has actually done some performance tuning) can send  a basic list of steps that I can do immediately, instead of reading through these large guides.
    I know I am looking for a shortcut, but this is the need of the hour.
    Thanks
    Arun

  • Need Advice on improving script processing and ensuring completion

    Hi,
    I have a program in which I am running a number of for loops which are doing a number of different things.  I pull in data from an xml file and then step through that data to dynamically create arrays, populate the arrays, and create and modify movie clips.
    The program I'm building is similar in scope to one I developed in Director many years ago, and in that environment we had to actually put breaks in using timers to ensure that the data would be processed and that the system wouldn't choke.
    What I'm seeing with this flash version of the application is similar and I suspect the same.  Basically, when navigating from the frame where the scripts are processed to the frame where the movie clips are displayed, there are times when it works perfectly and times when things are out of whack.  I put in a 5 second delay (arbitrarily) to see if this would resolve the issue and on my system at least it does.  But I need some advice on coming up with a real solution.
    Any inofrmation you can give me about processing particularly as it relates to for loops and dynamic creation of elements (whether arrays or MCs) as well as making sure that everything is done woudl be greatly appreciated.
    Best regards,
    Chris McLaughlin

    Hi Andrei,
    First . . . thank you so much for your message.
    I'm sure that there is something in the code architecture that's amiss.  If you'd be kind enough to take a look and see if anything blatant jumps out at you I would be very grateful.  I'm just not seeing it.
    Here it is:
    stop();
    import flash.utils.*;
    import flash.events.MouseEvent;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.net.URLLoaderDataFormat;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    pageBlock_mc.mandatoryWarning_mc.visible = false;
    sp1Mask_mc.height = 10;
    scrollPane1_mc.mask = sp1Mask_mc;
    //************************************************VARIABLES****************************************************
    var tl:MovieClip = this;
    var prd:int;
    var seg:int;
    var sld:int;
    var ICPcontent:XML;
    var productCount:Number;
    var productName:String;
    var segmentTitle:String;
    var slideURL:String;
    var productsArray:Array;
    var AssuritySegmentsArray:Array;
    var ComfortisSegmentsArray:Array;
    var ComfortisMandatoryArray:Array;
    var SWFsArray:Array;
    var videosArray:Array;
    var ReconcileSegmentsArray:Array;
    var TrifexisSegmentsArray:Array;
    var showArray:Array = new Array;
    var tempArray:Array;
    var subNum:Number = 1;
    var textHeight:Number;
    var xmlLoader:URLLoader = new URLLoader();
    var whichMajorBucket:String;
    var whichDeck:String;
    var fct:String;
    var segSlide:String
    var breakTimer:Timer;
    breakTimer = new Timer(500, 1);
    breakTimer.addEventListener("timer", doNext);
    function doNext(event:TimerEvent):void {
         trace("DO NEXT TRIGGERED and fct = " + fct);
         switch(fct) {
              case "assurity":
              trace("buildAssuritySlides()");
              buildAssuritySlides();
              break;
              case "comfortis":
              buildComfortisSlides();
              break;
              case "reconcile":
              buildReconcileSlides();
              break;
              case "addListeners":
              Object(this).startAssurity_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToBuild);
              Object(this).startComfortis_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToBuild);
              Object(this).startReconcile_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToBuild);
              Object(this).pickAssurityDeck_mc.core_btn.addEventListener(MouseEvent.MOUSE_DOWN , goToBuild)
              Object(this).pickAssurityDeck_mc.quickStart_btn.addEventListener(MouseEvent.MOUS E_DOWN, goToBuild)
              trace("last timer triggered");
              fct = "ready?";
              breakTimer = new Timer(5000, 1);
              breakTimer.addEventListener("timer", doNext);
              breakTimer.start();
              break;
              case "ready?":
              Object(this).pageBlock_mc.visible = false;
              break;
    xmlLoader.addEventListener(Event.COMPLETE, loadContent);
    xmlLoader.load(new URLRequest("data/elancoICP.xml")); // + "?" + Math.random())
    //xmlLoader.load(new URLRequest("data/elancoICP.xml" + "?" + Math.random()));
    function loadContent(e:Event):void {
    XML.ignoreWhitespace = true;
    ICPcontent = new XML(e.target.data);
    productCount = ICPcontent.product.length()
    trace("the product count = " + productCount);
    productsArray = new Array;
    for (var i:int = 0; i<productCount; i++){
         productName = ICPcontent.product[i].productName.text();
         productsArray.push(productName);
         trace("productsArray = " + productsArray);
         buildAssurity();
    function buildAssurity(): void {
         tempArray = new Array();
         AssuritySegmentsArray = new Array();
         for( var a:int = 0; a < ICPcontent.product[0].segmentName.length(); a++) {
                   segmentTitle = ICPcontent.product[0].segmentName[a].text();
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.text = segmentTitle;
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.autoSize = TextFieldAutoSize.CENTER
                   textHeight = scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.height
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.selectable = false;
                        if(textHeight < 35) {
                             scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 26;
                        } else {
                             if((textHeight > 22) && (textHeight < 50)) {
                                  scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 17;
                                  } else {
                                       if(textHeight > 50){
                                            scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 10;
                   subNum++;
                   AssuritySegmentsArray.push(segmentTitle);
                   tl["Assurity_" + segmentTitle + "_Array"] = new Array();
                   tl["Assurity_" + segmentTitle + "_Array"].name = "Assurity_" + segmentTitle + "_Array"
              if(a == ICPcontent.product[0].segmentName.length()) {
                   buildComfortis();
    function buildComfortis(): void {
         ComfortisSegmentsArray = new Array();
         for( var c:int = 0; c < ICPcontent.product[1].segmentName.length(); c++) {
                   segmentTitle = ICPcontent.product[1].segmentName[c].text();
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.text = segmentTitle;
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.autoSize = TextFieldAutoSize.CENTER
                   textHeight = scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.height
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.selectable = false;
                        if(textHeight < 35) {
                             scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 26;
                        } else {
                             if((textHeight > 22) && (textHeight < 50)) {
                                  scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 17;
                                  } else {
                                       if(textHeight > 50){
                                            scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 10;
                                   subNum++;
                   ComfortisSegmentsArray.push(segmentTitle);
                   tl["Comfortis_" + segmentTitle + "_Array"] = new Array();
                   tl["Comfortis_" + segmentTitle + "_Array"].name = "Comfortis_" + segmentTitle + "_Array"
         ComfortisMandatoryArray = new Array();
         var mandatory:String;
         for(var cm:int = 0; cm < ICPcontent.product[1].mandatorySlides.slide.length(); cm++) {
              mandatory = ICPcontent.product[1].mandatorySlides.slide[cm].text();
              ComfortisMandatoryArray.push(mandatory);          
         SWFsArray = new Array();
         var SWF:String;
         for(var s:int = 0; s < ICPcontent.product[1].SWFs.slide.length(); s++) {
              SWF = ICPcontent.product[1].SWFs.slide[s].text();
              SWFsArray.push(SWF);          
         videosArray = new Array();
         var video:String;
         for(var v:int = 0; v < ICPcontent.product[1].Videos.slide.length(); v++) {
              video = ICPcontent.product[1].Videos.slide[v].text();
              videosArray.push(video);          
         if(c == ICPcontent.product[1].segmentName.length()) {
              buildReconcile();
    function buildReconcile():void {
         ReconcileSegmentsArray = new Array();
         for( var r:int = 0; r < ICPcontent.product[2].segmentName.length(); r++) {
                   segmentTitle = ICPcontent.product[2].segmentName[r].text();
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.text = segmentTitle;
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.autoSize = TextFieldAutoSize.CENTER
                   textHeight = scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.height
                   scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.selectable = false;
                        if(textHeight < 35) {
                             scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 26;
                        } else {
                             if((textHeight > 22) && (textHeight < 50)) {
                                  scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 17;
                                  } else {
                                       if(textHeight > 50){
                                            scrollPane1_mc["sub" + subNum + "_mc"].sbText_tf.y = 10;
                                   subNum++;
                   ReconcileSegmentsArray.push(segmentTitle);
                   tl["Reconcile_" + segmentTitle + "_Array"] = new Array();
                   tl["Reconcile_" + segmentTitle + "_Array"].name = "Reconcile_" + segmentTitle + "_Array"
         trace("assurity segments = " + AssuritySegmentsArray);
         trace("comfortis segments = " + ComfortisSegmentsArray);
         trace("reconcile segments = " + ReconcileSegmentsArray);
         var sp1level:Number = scrollPane1_mc.numChildren - 1;
         trace("sp1level = " + sp1level);
              if(r == ICPcontent.product[2].segmentName.length()) {
                   fct = "assurity"
                   breakTimer.start();
    function buildAssuritySlides(): void {
         trace("buildAssuritySlides() triggered");
         var aSegLength:Number = AssuritySegmentsArray.length-1;
         var aSldLength:Number = ICPcontent.product[0].segmentSlides[aSegLength].slide.length()-1
         trace("aSegLength = " + aSegLength + " & aSldLength = " + aSldLength);
         for (seg = 0; seg < AssuritySegmentsArray.length; seg++) {
              for (sld = 0; sld < ICPcontent.product[0].segmentSlides[seg].slide.length(); sld++) {
                   segSlide = String(ICPcontent.product[0].segmentSlides[seg].slide[sld].text());
                   tl["Assurity_" + String(AssuritySegmentsArray[seg]) + "_Array"].push(segSlide)
                   if(seg == aSegLength) {
                        trace("sld = " + String(sld))
                        if(sld == aSldLength) {
                             trace("IT DOES sld = 8");
                             fct = "comfortis";
                             breakTimer = new Timer(500, 1);
                             breakTimer.addEventListener("timer", doNext);
                             breakTimer.start();
    function buildComfortisSlides(): void {
         var cSegLength:Number = ComfortisSegmentsArray.length-1;
         var cSldLength:Number = ICPcontent.product[1].segmentSlides[cSegLength].slide.length()-1
         for (seg = 0; seg < ComfortisSegmentsArray.length; seg++) {
              for (sld = 0; sld < ICPcontent.product[1].segmentSlides[seg].slide.length(); sld++) {
                   segSlide = String(ICPcontent.product[1].segmentSlides[seg].slide[sld].text());
                   tl["Comfortis_" + String(ComfortisSegmentsArray[seg]) + "_Array"].push(segSlide)
                   if(seg == cSegLength) {
                        if(sld == cSldLength) {
                             trace("IT DOES");
                             fct = "reconcile";
                             breakTimer = new Timer(500, 1);
                             breakTimer.addEventListener("timer", doNext);
                             breakTimer.start();
    function buildReconcileSlides(): void {
         var rSegLength:Number = ReconcileSegmentsArray.length-1;
         var rSldLength:Number = ICPcontent.product[2].segmentSlides[rSegLength].slide.length()-1
         for (seg = 0; seg < ReconcileSegmentsArray.length; seg++) {
              for (sld = 0; sld < ICPcontent.product[2].segmentSlides[seg].slide.length(); sld++) {
                   segSlide = String(ICPcontent.product[2].segmentSlides[seg].slide[sld].text());
                   tl["Reconcile_" + String(ReconcileSegmentsArray[seg]) + "_Array"].push(segSlide)
                   if(seg == rSegLength) {
                        if(sld == rSldLength) {
                             trace("IT DOES");
                             fct = "addListeners";
                             breakTimer = new Timer(500, 1);
                             breakTimer.addEventListener("timer", doNext);
                             breakTimer.start();
    function checkAslide(): void {
         trace("checking the Comfortis Mode of Action slides")
         trace ("array = " + tl["Comfortis_" + String(ComfortisSegmentsArray[0]) + "_Array"][0]);
    function goToBuild(event:MouseEvent):void {
         switch(event.target.name) {
              case "startAssurity_btn":
    //          whichMajorBucket = "Assurity";
    //          if(pickAssurityDeck_mc.y == 275) {
    //               trace("it's hidden");
    //               var showTween:Tween = new Tween(pickAssurityDeck_mc, "y", Strong.easeOut, 275, 392, 1, true);
    //          } else {
    //               var hideTween:Tween = new Tween(pickAssurityDeck_mc, "y", Strong.easeOut, 392, 275, 1, true);
              break;
              case "quickStart_btn":
              //whichMajorBucket = "Assurity";
    //          whichDeck = String(AssuritySegmentsArray[0])
    //          gotoAndPlay("builder");
              break;
              case "core_btn":
              //whichMajorBucket = "Assurity";
    //          whichDeck = String(AssuritySegmentsArray[1])
    //          gotoAndPlay("builder");
              break;
              case "startComfortis_btn":
              whichMajorBucket = "Comfortis";
              whichDeck = "Core";
              gotoAndPlay("builder");
              break;
              case "startReconcile_btn":
              //whichMajorBucket = "Reconcile";
    //          whichDeck = "Core";
    //          gotoAndPlay("builder");
              break;

  • RE: Need help to improve performance!!

    Hi Experts,
    There is an standard SAP tcode FPREPT  which is to re-print a receipt. The execution of the Query time takes 5+ minutes.
    Can anybody suggest me the best way to improve this and if hlp me with any SAP note available for the same.
    vishal

    Hi,
    Check this note
    Note 607651 - FPREPT/FPY1: Performance for receipt number assignment
    It is a old one for release 471 (FI-CA)
    What is your release ?
    Regards

  • Need help in improving performance of prorating quantities to stores for existing orders

    I have a code written to allocate quantities to stores for an existing order. Suppose there is a supplier order with quantity of 100 and this needs to distributed among 4 stores which has a demand of 50,40,30 and 20. Since total demand not equal to available quantity. the available quantity needs to be allocated to stores using an algorithm.
    ALgorithm is like allocating the stores in small pieces of innersize. Innersize is nothing but
    quantity within the pack of packs i.e. pack has 4 pieces and each pieces internally has 10 pieces,
    this 10 is called innersize.
    While allocating, each store is provided quantities of innersize first and this looping continues
    until available quantity is over
    Ex:
    store1=10
    store2=10
    store3=10
    store4=10
    second time:
    store1=10(old)+10
    store2=10(old)+10
    store3=10(old)+10
    store4=10(old)+10--demand fulfilled
    third time
    store1=20(old)+10
    store2=20(old)+10
    -- available quantity is over and hence stopped.
    My code below-
    =================================================
    int prorate_allocation()
      char *function = "prorate_allocation";
      long t_cnt_st;
      int t_innersize;
      int   t_qty_ordered;
      int t_cnt_lp;
      bool t_complete;
      sql_cursor alloc_cursor;
      EXEC SQL DECLARE c_order CURSOR FOR -- cursor to get orders, item in that, inner size and available qty.
      SELECT oh.order_no,
      ol.item,
      isc.inner_pack_size,
      ol.qty_ordered
      FROM ABRL_ALC_CHG_TEMP_ORDHEAD oh,
      ordloc ol,
      item_supp_country isc
      WHERE oh.order_no=ol.order_no
      AND oh.supplier=isc.supplier
      and ol.item=isc.item
      AND     EXISTS (SELECT 1 FROM abrl_alc_chg_details aacd WHERE oh.order_no=aacd.order_no)
            AND     ol.qty_ordered>0;
      char   v_order_no[10];
      char v_item[25];
      double v_innersize;
      char   v_qty_ordered[12];
      char v_alloc_no[11];
      char v_location[10];
      char v_qty_allocated[12];
      int *store_quantities;
      bool *store_processed_flag;
      EXEC SQL OPEN c_order;
      if (SQL_ERROR_FOUND)
      sprintf(err_data,"CURSOR OPEN: cursor=c_order");
      strcpy(table,"ORDHEAD, ORDLOC, ITEM_SUPP_COUNTRY");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      EXEC SQL ALLOCATE :alloc_cursor;
      while(1)
      EXEC SQL FETCH c_order INTO :v_order_no,
      :v_item,
      :v_innersize,
      :v_qty_ordered;
      if (SQL_ERROR_FOUND)
      sprintf(err_data,"CURSOR FETCH: cursor=c_order");
      strcpy(table,"ORDHEAD, ORDLOC, ITEM_SUPP_COUNTRY");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      if (NO_DATA_FOUND) break;
      t_qty_ordered     =atoi(v_qty_ordered);
      t_innersize =(int)v_innersize;
      t_cnt_lp         = t_qty_ordered/t_innersize;
      t_complete =FALSE;
      EXEC SQL SELECT COUNT(*) INTO :t_cnt_st
      FROM abrl_alc_chg_ad ad,
      alloc_header ah
      WHERE ah.alloc_no=ad.alloc_no
      AND   ah.order_no=:v_order_no
      AND   ah.item=:v_item
      AND   ad.qty_allocated!=0;
      if SQL_ERROR_FOUND
                sprintf(err_data,"SELECT: ALLOC_DETAIL, count = %s\n",t_cnt_st);
                strcpy(table,"ALLOC_DETAIL");
                WRITE_ERROR(SQLCODE,function,table,err_data);
                return(-1);
      if (t_cnt_st>0)
      store_quantities=(int *) calloc(t_cnt_st,sizeof(int));
      store_processed_flag=(bool *) calloc(t_cnt_st,sizeof(bool));
      EXEC SQL EXECUTE
      BEGIN
      OPEN :alloc_cursor FOR SELECT ad.alloc_no,
      ad.to_loc,
      ad.qty_allocated
      FROM    alloc_header ah,
      abrl_alc_chg_ad ad
      WHERE   ah.alloc_no=ad.alloc_no
      AND     ah.item=:v_item
      AND     ah.order_no=:v_order_no
      order by ad.qty_allocated desc;
      END;
      END-EXEC;
      while (t_cnt_lp>0)
      EXEC SQL WHENEVER NOT FOUND DO break;
      for(int i=0;i<t_cnt_st;i++)
      EXEC SQL FETCH :alloc_cursor INTO :v_alloc_no,
      :v_location,
      :v_qty_allocated;
      if (store_quantities[i]!=(int)v_qty_allocated)
      store_quantities[i]=store_quantities[i]+t_innersize;
      t_cnt_lp--;
      if (t_cnt_lp==0)
      EXEC SQL CLOSE :alloc_cursor;
      break;
      else
      if(store_processed_flag[i]==FALSE)
      store_processed_flag[i]=TRUE;
      t_cnt_st--;
      if (t_cnt_st==0)
      t_complete=TRUE;
      break;
      if (t_complete==TRUE && t_cnt_lp!=0)
      for (int i=0;i<t_cnt_st;i++)
      store_quantities[i]=store_quantities[i]+v_innersize;
      t_cnt_lp--;
      if (t_cnt_lp==0)
      EXEC SQL CLOSE :alloc_cursor;
      break;
      }/*END OF WHILE*/
      EXEC SQL EXECUTE
      BEGIN
      OPEN :alloc_cursor FOR SELECT ad.alloc_no,
      ad.to_loc,
      ad.qty_allocated
      FROM    alloc_header ah,
      abrl_alc_chg_ad ad
      WHERE   ah.alloc_no=ad.alloc_no
      AND     ah.item=:v_item
      AND     ah.order_no=:v_order_no
      order by ad.qty_allocated desc;
      END;
      END-EXEC;
      EXEC SQL WHENEVER NOT FOUND DO break;
      for (int i=0;i<t_cnt_st;i++)
      EXEC SQL FETCH :alloc_cursor INTO :v_alloc_no,
      :v_location,
      :v_qty_allocated;
      EXEC SQL UPDATE abrl_alc_chg_ad
      SET qty_allocated=:store_quantities[i]
      WHERE to_loc=:v_location
      AND   alloc_no=:v_alloc_no;
      if SQL_ERROR_FOUND
      sprintf(err_data,"UPDATE: ALLOC_DETAIL, location = %s , alloc_no =%s\n", v_location,v_alloc_no);
      strcpy(table,"ALLOC_DETAIL");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      EXEC SQL UPDATE ABRL_ALC_CHG_DETAILS
      SET PROCESSED='Y'
      WHERE LOCATION=:v_location
      AND   alloc_no=:v_alloc_no
      AND PROCESSED IN ('E','U');
      if SQL_ERROR_FOUND
      sprintf(err_data,"UPDATE: ABRL_ALC_CHG_DETAILS, location = %s , alloc_no =%s\n", v_location,v_alloc_no);
      strcpy(table,"ABRL_ALC_CHG_DETAILS");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      EXEC SQL COMMIT;
      EXEC SQL CLOSE :alloc_cursor;
      free(store_quantities);
      free(store_processed_flag);
      }/*END OF IF*/
      }/*END OF OUTER WHILE LOOP*/
      EXEC SQL CLOSE c_order;
      if SQL_ERROR_FOUND
      sprintf(err_data,"CURSOR CLOSE: cursor = c_order");
      strcpy(table,"ORDHEAD, ORDLOC, ITEM_SUPP_COUNTRY");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
    return(0);
    } /* end prorate_allocation*/

    I have a code written to allocate quantities to stores for an existing order. Suppose there is a supplier order with quantity of 100 and this needs to distributed among 4 stores which has a demand of 50,40,30 and 20. Since total demand not equal to available quantity. the available quantity needs to be allocated to stores using an algorithm.
    ALgorithm is like allocating the stores in small pieces of innersize. Innersize is nothing but
    quantity within the pack of packs i.e. pack has 4 pieces and each pieces internally has 10 pieces,
    this 10 is called innersize.
    While allocating, each store is provided quantities of innersize first and this looping continues
    until available quantity is over
    Ex:
    store1=10
    store2=10
    store3=10
    store4=10
    second time:
    store1=10(old)+10
    store2=10(old)+10
    store3=10(old)+10
    store4=10(old)+10--demand fulfilled
    third time
    store1=20(old)+10
    store2=20(old)+10
    -- available quantity is over and hence stopped.
    My code below-
    =================================================
    int prorate_allocation()
      char *function = "prorate_allocation";
      long t_cnt_st;
      int t_innersize;
      int   t_qty_ordered;
      int t_cnt_lp;
      bool t_complete;
      sql_cursor alloc_cursor;
      EXEC SQL DECLARE c_order CURSOR FOR -- cursor to get orders, item in that, inner size and available qty.
      SELECT oh.order_no,
      ol.item,
      isc.inner_pack_size,
      ol.qty_ordered
      FROM ABRL_ALC_CHG_TEMP_ORDHEAD oh,
      ordloc ol,
      item_supp_country isc
      WHERE oh.order_no=ol.order_no
      AND oh.supplier=isc.supplier
      and ol.item=isc.item
      AND     EXISTS (SELECT 1 FROM abrl_alc_chg_details aacd WHERE oh.order_no=aacd.order_no)
            AND     ol.qty_ordered>0;
      char   v_order_no[10];
      char v_item[25];
      double v_innersize;
      char   v_qty_ordered[12];
      char v_alloc_no[11];
      char v_location[10];
      char v_qty_allocated[12];
      int *store_quantities;
      bool *store_processed_flag;
      EXEC SQL OPEN c_order;
      if (SQL_ERROR_FOUND)
      sprintf(err_data,"CURSOR OPEN: cursor=c_order");
      strcpy(table,"ORDHEAD, ORDLOC, ITEM_SUPP_COUNTRY");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      EXEC SQL ALLOCATE :alloc_cursor;
      while(1)
      EXEC SQL FETCH c_order INTO :v_order_no,
      :v_item,
      :v_innersize,
      :v_qty_ordered;
      if (SQL_ERROR_FOUND)
      sprintf(err_data,"CURSOR FETCH: cursor=c_order");
      strcpy(table,"ORDHEAD, ORDLOC, ITEM_SUPP_COUNTRY");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      if (NO_DATA_FOUND) break;
      t_qty_ordered     =atoi(v_qty_ordered);
      t_innersize =(int)v_innersize;
      t_cnt_lp         = t_qty_ordered/t_innersize;
      t_complete =FALSE;
      EXEC SQL SELECT COUNT(*) INTO :t_cnt_st
      FROM abrl_alc_chg_ad ad,
      alloc_header ah
      WHERE ah.alloc_no=ad.alloc_no
      AND   ah.order_no=:v_order_no
      AND   ah.item=:v_item
      AND   ad.qty_allocated!=0;
      if SQL_ERROR_FOUND
                sprintf(err_data,"SELECT: ALLOC_DETAIL, count = %s\n",t_cnt_st);
                strcpy(table,"ALLOC_DETAIL");
                WRITE_ERROR(SQLCODE,function,table,err_data);
                return(-1);
      if (t_cnt_st>0)
      store_quantities=(int *) calloc(t_cnt_st,sizeof(int));
      store_processed_flag=(bool *) calloc(t_cnt_st,sizeof(bool));
      EXEC SQL EXECUTE
      BEGIN
      OPEN :alloc_cursor FOR SELECT ad.alloc_no,
      ad.to_loc,
      ad.qty_allocated
      FROM    alloc_header ah,
      abrl_alc_chg_ad ad
      WHERE   ah.alloc_no=ad.alloc_no
      AND     ah.item=:v_item
      AND     ah.order_no=:v_order_no
      order by ad.qty_allocated desc;
      END;
      END-EXEC;
      while (t_cnt_lp>0)
      EXEC SQL WHENEVER NOT FOUND DO break;
      for(int i=0;i<t_cnt_st;i++)
      EXEC SQL FETCH :alloc_cursor INTO :v_alloc_no,
      :v_location,
      :v_qty_allocated;
      if (store_quantities[i]!=(int)v_qty_allocated)
      store_quantities[i]=store_quantities[i]+t_innersize;
      t_cnt_lp--;
      if (t_cnt_lp==0)
      EXEC SQL CLOSE :alloc_cursor;
      break;
      else
      if(store_processed_flag[i]==FALSE)
      store_processed_flag[i]=TRUE;
      t_cnt_st--;
      if (t_cnt_st==0)
      t_complete=TRUE;
      break;
      if (t_complete==TRUE && t_cnt_lp!=0)
      for (int i=0;i<t_cnt_st;i++)
      store_quantities[i]=store_quantities[i]+v_innersize;
      t_cnt_lp--;
      if (t_cnt_lp==0)
      EXEC SQL CLOSE :alloc_cursor;
      break;
      }/*END OF WHILE*/
      EXEC SQL EXECUTE
      BEGIN
      OPEN :alloc_cursor FOR SELECT ad.alloc_no,
      ad.to_loc,
      ad.qty_allocated
      FROM    alloc_header ah,
      abrl_alc_chg_ad ad
      WHERE   ah.alloc_no=ad.alloc_no
      AND     ah.item=:v_item
      AND     ah.order_no=:v_order_no
      order by ad.qty_allocated desc;
      END;
      END-EXEC;
      EXEC SQL WHENEVER NOT FOUND DO break;
      for (int i=0;i<t_cnt_st;i++)
      EXEC SQL FETCH :alloc_cursor INTO :v_alloc_no,
      :v_location,
      :v_qty_allocated;
      EXEC SQL UPDATE abrl_alc_chg_ad
      SET qty_allocated=:store_quantities[i]
      WHERE to_loc=:v_location
      AND   alloc_no=:v_alloc_no;
      if SQL_ERROR_FOUND
      sprintf(err_data,"UPDATE: ALLOC_DETAIL, location = %s , alloc_no =%s\n", v_location,v_alloc_no);
      strcpy(table,"ALLOC_DETAIL");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      EXEC SQL UPDATE ABRL_ALC_CHG_DETAILS
      SET PROCESSED='Y'
      WHERE LOCATION=:v_location
      AND   alloc_no=:v_alloc_no
      AND PROCESSED IN ('E','U');
      if SQL_ERROR_FOUND
      sprintf(err_data,"UPDATE: ABRL_ALC_CHG_DETAILS, location = %s , alloc_no =%s\n", v_location,v_alloc_no);
      strcpy(table,"ABRL_ALC_CHG_DETAILS");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
      EXEC SQL COMMIT;
      EXEC SQL CLOSE :alloc_cursor;
      free(store_quantities);
      free(store_processed_flag);
      }/*END OF IF*/
      }/*END OF OUTER WHILE LOOP*/
      EXEC SQL CLOSE c_order;
      if SQL_ERROR_FOUND
      sprintf(err_data,"CURSOR CLOSE: cursor = c_order");
      strcpy(table,"ORDHEAD, ORDLOC, ITEM_SUPP_COUNTRY");
      WRITE_ERROR(SQLCODE,function,table,err_data);
      return(-1);
    return(0);
    } /* end prorate_allocation*/

  • My Verizon Plan (Need Advice)

    Hello,
    So here is my situation. My upgrade is coming around (though my two-year contract doesn't expire till like beginning of August) and my current phone is on its last legs. I'd really like to upgrade it. The thing is, I'm going back home (to India) from mid-May to mid-August (Might just be here till end June though!). And I'm most probably going to be studying abroad (in South Africa) from January till July. Meaning I'll only be in the USA from mid-August till mid-December and then from 2013 mid-August till end-May of 2014.
    So I'm wondering what I should do about my plan. I don't want to pay for the months that I'll be out of the country and I do want a smartphone with a data plan and unlimited texting. Minutes can be as minimal as possible. I'm willing to give up my current plan which has unlimited data usage if necessary.
    Thanks a ton,
    Sahil

    Thanks Eric.
    That limitation on the 4770K (Hasswell) is now clear for me.
    On the Intel website, the i7 Extreme Processors list, the 3930K is not present. It's a 2nd Generation.
    Should I opt for it of for a 4th Generation ?
    On the audio side I will check with Steinberg.
    The Matrox MXO2 has 5.1 audio monitoring. I will check if it works with NUENDO. With Audition CC it should work for sure.

  • SBS 2011 Migration Plan need advice

    Hello,
    I currently have an issue with our SBS 2011 server, its about to hit its 75 device limit and I need to seriously consider migration to a standard server. So I will need to migrate my MS exchange onto a new server as I don't like having exchange and my domain controller on the same box (want this is house and not 365)
    If possible I want to upgrade the SBS 2011 license to a Server 2012 license and upgrade the CALs along with it. Is this possible and does anyone know where I can obtain pricing for exchange and the upgrade?
    Thanks
    Martyn.
    This topic first appeared in the Spiceworks Community

    I checked that and they are only pointing to the new SBS 2011 server. I turned off the DHCP server on the old server per the SBS 2011 Migration doc. If I Login to that computer as admin it logs in fine. I believe it's getting helled up on loading the GP.    
    Thanks for the quick reply!!!!    I can remote in right now so if you can think of anything else.  I am not even worried so much about the slow login as I am the folder redirection issues.  I need to get these users going on the
    new server as the old one will shutdown in 5 days.

  • Need advice on improving wireless service in my home

    We have a 3 story house and the router is on the second floor.  There are parts of the first floor that cannot get wireless. The only service on the first floor is a set top box for the TV.
    I figure my options are:
    --Get an additional router for the first floor
    --Move the existing router to the first floor (which would probably cut off service to the thrid floor
    --Replace the existing router with something more powerful that will reach all areas of the house
    What do you recommend?  If #1 or #3, should I go through Verizon, or buy a third party product and install myself?  Will I need other products (splitter, etc) if I install it myself?  
    Jeff

    JJaeger3 wrote:
    We have a 3 story house and the router is on the second floor.  There are parts of the first floor that cannot get wireless. The only service on the first floor is a set top box for the TV.
    I figure my options are:
    --Get an additional router for the first floor
    --Move the existing router to the first floor (which would probably cut off service to the thrid floor
    --Replace the existing router with something more powerful that will reach all areas of the house
    What do you recommend?  If #1 or #3, should I go through Verizon, or buy a third party product and install myself?  Will I need other products (splitter, etc) if I install it myself?  
    Jeff
    You can get a dual band wireless extender and put it on the first floor. https://teleproducts.verizon.com/fios/index.cfm/eh/DisplayDetails It will solve all your issues and it is very easy to install. I have one and it works great.

  • What are the privileges required for explain plan in Oracle 11g database

    I am facing the problem in doing a explain plan for a view in Oracle 11g database. When I select from the view like this:
    select * from zonewisearpu
    It does a select on the view but when I give explain plan like
    explain plan for
    select * from zonewisearpu
    I get the error like insufficient privileges.
    Please let me know if things are getting missed out as I guess system level privileges are required to execute this.
    I hope, my question is clear.
    It’s a humble request to revert urgently if possible as I need to complete a task and do not know the way out.
    Regards

    975148 wrote:
    Thanks for your reply. I have found out that an explain plan is possible on the user's own objects and is not possible on the granted objects from a different schema. For eg, if I do a explain plan on a view querying on tables from a different view, it would not allow the explain plan to proceed. This could mean that explain plan needs different privileges than just a select.
    Requesting for a revert to this.
    Here is a simple test case that I have perfomed
    SQL> create user test1 identified by test1;
    User created.
    SQL> create user test2 identified by test1;
    User created.
    SQL> grant connect, resource to test1,test2;
    Grant succeeded.
    SQL> create table test1.tab1 as select * from v$session;
    Table created.
    SQL> connect test2/test1
    Conencted.
    SQL> show user
    USER is "TEST2"
    SQL>
    SQL> explain plan for
      2  select sid,serial#,status,username from test1.tab1 where username<> '';
    Explained.
    SQL>
    So, as can be seen I am able to do a explain plan from user test2 for tables belong to user test1.
    As far as privileges are concerned, following is the list
    SQL> select * from dba_role_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE                        GRANTED_ROLE                   ADM DEF
    TEST1                          CONNECT                        NO  YES
    TEST1                          RESOURCE                       NO  YES
    TEST2                          CONNECT                        NO  YES
    TEST2                          RESOURCE                       NO  YES
    SQL>
    SQL> select grantee,owner,table_name,privilege from dba_tab_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE    OWNER      TABLE_NAME           PRIVILEGE
    TEST2      TEST1      TAB1                 SELECT
    SQL>
    SQL>  select * from dba_sys_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE    PRIVILEGE                      ADM
    TEST1      UNLIMITED TABLESPACE           NO
    TEST2      UNLIMITED TABLESPACE           NO
    SQL>

  • Ora-01039 - Insuffficient priviliges - Tuning using Explain Plan

    In a TEST instance, i am trying (as the APPS user) on a 9.2.0.5 DB (11.5.10.2) trying to run an explain plan on a query but keep getting the 'ora-01039 - Insuffficient privileges on underlying objects of view' error message.
    I have granted 'select any dictionary' to both the APPS and APPLSYS users - but this does not seem to enable the explain plan to work.
    Could someone please shed some light on this?
    Tks

    You seem to be doin an Explain Plan on a query against a custom view against non-Apps objects.
    Explain Plan needs to be able to "see" the underlying tables (in that other schema).
    See :
    SQL> create view his_cntry_vw as select * from my_cntry;
    View created.
    SQL> grant select on his_cntry_vw to abc;
    Grant succeeded.
    SQL> connect abc/abc
    Connected.
    SQL> create synonym his_cntry_vw for otheruser.his_cntry_vw;
    Synonym created.
    SQL> select * from his_cntry_vw;
    GRP_I CNTRY
    ABC   Z9
    XYZ   UK
    SQL> explain plan for select * from his_cntry_vw;
    explain plan for select * from his_cntry_vw
    ERROR at line 1:
    ORA-01039: insufficient privileges on underlying objects of the view
    SQL> REM  THIS IS THE FIX :
    SQL> connect otheruser/otheruser
    Connected.
    SQL> grant select on my_cntry to abc;
    Grant succeeded.
    SQL> connect abc/abc
    Connected.
    SQL> explain plan for select * from his_cntry_vw;
    Explained.
    SQL>Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Best way to improve performance?

    I'm using a Dual Core Intel Xeon and starting to do video work on it with Final Cut Pro, etc.
    I've got 8GB of DDR2 FB-DIMM at 667MHz.
    I'm using a Cinema HD display, driven by a NVIDIA GeForce 7300 GT.
    What would be your best advice at improving performance (if there is any). I doubt more RAM would help; not sure if there is anything faster than 667Mhz for this machine; Could a newer video card help rendering speed?
    I'm generally very happy with how things work, can't afford a new MacPro, and am simply wondering if I should invest in something more affordable that could give me a slightly better kick?
    Many thanks,
    Czet

    One thing that's always useful is to make sure you've got iStat installed and see how much of your RAM is actually being used because 8Gb is a lot, even for HD but it doesn't rule out a lack of RAM.
    The 'biggest' increase in speed I've ever seen on any of my kit was a SSD. I've setup my Mac Pro with 2 x 128Gb SSD in the 2nd optical bay (in a 3.5" RAID 0 caddy) and setup Final Cut Pro to use 2 x 1.5Tb Seagate 7200.4's in software RAID 0 and everything flies. A 256Gb SSD is far more expensive (and slower) than 2 x 128Gb's in a RAID 0 caddy so a no brainer.
    Graphics cards always help but in my experience the only place you'll notice significant improvements are Games and software such as Motion/Aperture where you really must have a decent card.

  • How to improve the query performance or tune query from Explain Plan

    Hi
    The following is my explain plan for sql query. (The plan is generated by Toad v9.7). How to fix the query?
    SELECT STATEMENT ALL_ROWSCost: 4,160 Bytes: 25,296 Cardinality: 204                                         
         8 NESTED LOOPS Cost: 3 Bytes: 54 Cardinality: 1                                    
              5 NESTED LOOPS Cost: 2 Bytes: 23 Cardinality: 1                               
                   2 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 13 Cardinality: 1                          
                        1 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1                     
                   4 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CUST_ACCOUNTS Cost: 1 Bytes: 10 Cardinality: 1                          
                        3 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_CUST_ACCOUNTS_U1 Cost: 1 Cardinality: 1                     
              7 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_PARTIES Cost: 1 Bytes: 31 Cardinality: 1                               
                   6 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_PARTIES_U1 Cost: 1 Cardinality: 1                          
         10 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1                                    
              9 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1                               
         15 NESTED LOOPS Cost: 2 Bytes: 29 Cardinality: 1                                    
              12 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1                               
                   11 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1                          
              14 TABLE ACCESS BY INDEX ROWID TABLE ONT.OE_ORDER_HEADERS_ALL Cost: 1 Bytes: 17 Cardinality: 1                               
                   13 INDEX RANGE SCAN INDEX (UNIQUE) ONT.OE_ORDER_HEADERS_U2 Cost: 1 Cardinality: 1                          
         21 FILTER                                    
              16 TABLE ACCESS FULL TABLE ONT.OE_TRANSACTION_TYPES_TL Cost: 2 Bytes: 1,127 Cardinality: 49                               
              20 NESTED LOOPS Cost: 2 Bytes: 21 Cardinality: 1                               
                   18 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1                          
                        17 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1                     
                   19 INDEX RANGE SCAN INDEX (UNIQUE) ONT.OE_ORDER_HEADERS_U2 Cost: 1 Bytes: 9 Cardinality: 1                          
         23 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 12 Cardinality: 1                                    
              22 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cost: 1 Cardinality: 1                               
         45 NESTED LOOPS Cost: 4,160 Bytes: 25,296 Cardinality: 204                                    
              42 NESTED LOOPS Cost: 4,150 Bytes: 23,052 Cardinality: 204                               
                   38 NESTED LOOPS Cost: 4,140 Bytes: 19,992 Cardinality: 204                          
                        34 NESTED LOOPS Cost: 4,094 Bytes: 75,850 Cardinality: 925                     
                             30 NESTED LOOPS Cost: 3,909 Bytes: 210,843 Cardinality: 3,699                
                                  26 PARTITION LIST ALL Cost: 2,436 Bytes: 338,491 Cardinality: 14,717 Partition #: 29 Partitions accessed #1 - #18          
                                       25 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_AE_HEADERS Cost: 2,436 Bytes: 338,491 Cardinality: 14,717 Partition #: 29 Partitions accessed #1 - #18     
                                            24 INDEX SKIP SCAN INDEX XLA.XLA_AE_HEADERS_N1 Cost: 264 Cardinality: 1,398,115 Partition #: 29 Partitions accessed #1 - #18
                                  29 PARTITION LIST ITERATOR Cost: 1 Bytes: 34 Cardinality: 1 Partition #: 32           
                                       28 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_AE_LINES Cost: 1 Bytes: 34 Cardinality: 1 Partition #: 32      
                                            27 INDEX RANGE SCAN INDEX (UNIQUE) XLA.XLA_AE_LINES_U1 Cost: 1 Cardinality: 1 Partition #: 32
                             33 PARTITION LIST ITERATOR Cost: 1 Bytes: 25 Cardinality: 1 Partition #: 35                
                                  32 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_DISTRIBUTION_LINKS Cost: 1 Bytes: 25 Cardinality: 1 Partition #: 35           
                                       31 INDEX RANGE SCAN INDEX XLA.XLA_DISTRIBUTION_LINKS_N3 Cost: 1 Cardinality: 1 Partition #: 35      
                        37 PARTITION LIST SINGLE Cost: 1 Bytes: 16 Cardinality: 1 Partition #: 38                     
                             36 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_EVENTS Cost: 1 Bytes: 16 Cardinality: 1 Partition #: 39 Partitions accessed #2               
                                  35 INDEX UNIQUE SCAN INDEX (UNIQUE) XLA.XLA_EVENTS_U1 Cost: 1 Cardinality: 1 Partition #: 40 Partitions accessed #2          
                   41 PARTITION LIST SINGLE Cost: 1 Bytes: 15 Cardinality: 1 Partition #: 41                          
                        40 TABLE ACCESS BY LOCAL INDEX ROWID TABLE XLA.XLA_TRANSACTION_ENTITIES Cost: 1 Bytes: 15 Cardinality: 1 Partition #: 42 Partitions accessed #2                    
                             39 INDEX UNIQUE SCAN INDEX (UNIQUE) XLA.XLA_TRANSACTION_ENTITIES_U1 Cost: 1 Cardinality: 1 Partition #: 43 Partitions accessed #2               
              44 TABLE ACCESS BY INDEX ROWID TABLE GL.GL_CODE_COMBINATIONS Cost: 1 Bytes: 11 Cardinality: 1                               
                   43 INDEX UNIQUE SCAN INDEX (UNIQUE) GL.GL_CODE_COMBINATIONS_U1 Cost: 1 Cardinality: 1

    damorgan wrote:
    Tuning is NOT about reducing the cost of i/o.
    i/o is only one of many contributors to cost and only one of many contributors to waits.
    Any time you would like to explore this further run this code:
    SELECT 1 FROM dual
    WHERE regexp_like(' ','^*[ ]*a');but not on a production box because you are going to experience an extreme tuning event with zero i/o.
    And when I say "extreme" I mean "EXTREME!"
    You've been warned.I think you just need a faster server.
    SQL> set autotrace traceonly statistics
    SQL> set timing on
    SQL> select 1 from dual
      2  where
      3  regexp_like   (' ','^*[ ]*a');
    no rows selected
    Elapsed: 00:00:00.00
    Statistics
              1  recursive calls
              0  db block gets
              0  consistent gets
              0  physical reads
              0  redo size
            243  bytes sent via SQL*Net to client
            349  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              0  rows processedRepeated from an Oracle 10.2.0.x instance:
    SQL> SELECT DISTINCT SID FROM V$MYSTAT;
           SID
           310
    SQL> ALTER SESSION SET EVENTS '10053 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    Session altered.
    SQL> select 1 from dual
      2  where
      3  regexp_like   (' ','^*[ ]*a');The session is hung. Wait a little while and connect to the database using a different session:
    COLUMN STAT_NAME FORMAT A35 TRU
    SET PAGESIZE 200
    SELECT
      STAT_NAME,
      VALUE
    FROM
      V$SESS_TIME_MODEL
    WHERE
      SID=310;
    STAT_NAME                                VALUE
    DB time                                   9247
    DB CPU                                    9247
    background elapsed time                      0
    background cpu time                          0
    sequence load elapsed time                   0
    parse time elapsed                        6374
    hard parse elapsed time                   5997
    sql execute elapsed time                  2939
    connection management call elapsed        1660
    failed parse elapsed time                    0
    failed parse (out of shared memory)          0
    hard parse (sharing criteria) elaps          0
    hard parse (bind mismatch) elapsed           0
    PL/SQL execution elapsed time               95
    inbound PL/SQL rpc elapsed time              0
    PL/SQL compilation elapsed time              0
    Java execution elapsed time                  0
    repeated bind elapsed time                  48
    RMAN cpu time (backup/restore)               0Seems to be using a bit of time for the hard parse (hard parse elapsed time). Wait a little while, then re-execute the query:
    STAT_NAME                                VALUE
    DB time                                   9247
    DB CPU                                    9247
    background elapsed time                      0
    background cpu time                          0
    sequence load elapsed time                   0
    parse time elapsed                        6374
    hard parse elapsed time                   5997
    sql execute elapsed time                  2939
    connection management call elapsed        1660
    failed parse elapsed time                    0
    failed parse (out of shared memory)          0
    hard parse (sharing criteria) elaps          0
    hard parse (bind mismatch) elapsed           0
    PL/SQL execution elapsed time               95
    inbound PL/SQL rpc elapsed time              0
    PL/SQL compilation elapsed time              0
    Java execution elapsed time                  0
    repeated bind elapsed time                  48
    RMAN cpu time (backup/restore)               0The session is not reporting additional CPU usage or parse time.
    Let's check one of the session's statistics:
    SELECT
      SS.VALUE
    FROM
      V$SESSTAT SS,
      V$STATNAME SN
    WHERE
      SN.NAME='consistent gets'
      AND SN.STATISTIC#=SS.STATISTIC#
      AND SS.SID=310;
         VALUE
           163Not many consistent gets after 20+ minutes.
    Let's take a look at the plan:
    SQL> SELECT SQL_ID,CHILD_NUMBER FROM V$SQL WHERE SQL_TEXT LIKE 'select 1 from du
    al%';
    SQL_ID        CHILD_NUMBER
    04mpgrzhsv72w            0
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('04mpgrzhsv72w',0,'TYPICAL'))
    select 1 from dual where regexp_like   (' ','^*[ ]*a')
    NOTE: cannot fetch plan for SQL_ID: 04mpgrzhsv72w, CHILD_NUMBER: 0
          Please verify value of SQL_ID and CHILD_NUMBER;
          It could also be that the plan is no longer in cursor cache (check v$sql_p
    lan)No plan...
    Let's take a look at the 10053 trace file:
    Registered qb: SEL$1 0x19157f38 (PARSER)
      signature (): qb_name=SEL$1 nbfros=1 flg=0
        fro(0): flg=4 objn=258 hint_alias="DUAL"@"SEL$1"
    Predicate Move-Around (PM)
    PM: Considering predicate move-around in SEL$1 (#0).
    PM:   Checking validity of predicate move-around in SEL$1 (#0).
    CBQT: Validity checks failed for 7uqx4guu04x3g.
    CVM: Considering view merge in query block SEL$1 (#0)
    CBQT: Validity checks failed for 7uqx4guu04x3g.
    Subquery Unnest
    SU: Considering subquery unnesting in query block SEL$1 (#0)
    Set-Join Conversion (SJC)
    SJC: Considering set-join conversion in SEL$1 (#0).
    Predicate Move-Around (PM)
    PM: Considering predicate move-around in SEL$1 (#0).
    PM:   Checking validity of predicate move-around in SEL$1 (#0).
    PM:     PM bypassed: Outer query contains no views.
    FPD: Considering simple filter push in SEL$1 (#0)
    FPD:   Current where clause predicates in SEL$1 (#0) :
              REGEXP_LIKE (' ','^*[ ]*a')
    kkogcp: try to generate transitive predicate from check constraints for SEL$1 (#0)
    predicates with check contraints:  REGEXP_LIKE (' ','^*[ ]*a')
    after transitive predicate generation:  REGEXP_LIKE (' ','^*[ ]*a')
    finally:  REGEXP_LIKE (' ','^*[ ]*a')
    apadrv-start: call(in-use=592, alloc=16344), compile(in-use=37448, alloc=42256)
    kkoqbc-start
                : call(in-use=592, alloc=16344), compile(in-use=38336, alloc=42256)
    kkoqbc-subheap (create addr=000000001915C238)Looks like the query never had a chance to start executing - it is still parsing after 20 minutes.
    I am not sure that this is a good example - the query either executes very fast, or never has a chance to start executing. But, it might still make your point physical I/O is not always the problem when performance problems are experienced.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

Maybe you are looking for

  • How do I delete a podcast icon from my iphone?

    I'm somewhat Mac and iphone saavy and have looked all over the Net and these forums for an answer.  No dice! Let's see what you guys got:  I have deleted some podcasts from iTunes that I don't want to see anymore and the icon has stayed on my iphone.

  • Audio waveform will not display

    I just bought a new iMac and have opened a previous FCE4 file with it. The sequence will not display the audio waveform at all... it used to do fine displaying the waveform on my Powerbook G4. I've toggled the preferences to display audio waveform gl

  • How can i use a song as a ring tone from a cd i have loaded on the 4s

    How can i use a song as a ringtone from  a cd i have loaded on my iphone 4s

  • Add an MSSQL "Linked" Server Object as a Data Source in Sharepoint Designer

    This is a hard question to research as there are "Linked Data Sources" in SharePoint Designer.  NOT WHAT I'M TALKING ABOUT. :) In Microsoft SQL Server you can create Linked Databases.  I'd like to find a way to use a Linked Database as a Data Source

  • Telephone Directory in CME..

    Hi, I have implemented CME / CUE in three locaitons connected through WAN. I can call anyone in the Network. I need to create a Directory where i can see the Names with there Telephone Numbers. I should see all three branch telephone entries maped wi