So many loops decreasing the performance

So many loops are in loop, Is there any other statement to improve the performance
LOOP AT p0000 WHERE begda LE pn-endda
                AND   endda GE pn-begda.
    wa_datatab-pernr = p0000-pernr.
    LOOP AT p0001 WHERE begda LE p0000-endda
                  AND   endda GE p0000-begda.
      wa_datatab-werks = p0001-werks.
      wa_datatab-bukrs = p0001-bukrs.
      wa_datatab-persg = p0001-persg.
read technical date of entry and first working day
      CLEAR emp_period.
      LOOP AT p0041.
        CLEAR p41dat.
        DO 12 TIMES
              VARYING p41dat FROM p0041-dar01 NEXT p0041-dar02.
          IF ( p41dat-dar EQ ca_dar01 OR
               p41dat-dar EQ ca_dar04 OR
               p41dat-dar EQ ca_dar40 ) AND
               NOT p41dat-dat IS INITIAL.
            PERFORM employment_period USING p41dat-dat
                                            pn-begda
                                            emp_period.
            CASE p41dat-dar.
              WHEN ca_dar01.
                wa_datatab-dat01 = p41dat-dat.
                wa_datatab-dat01_period = emp_period.
              WHEN ca_dar40.
                wa_datatab-dat40 = p41dat-dat.
                wa_datatab-dat40_period = emp_period.
              WHEN ca_dar04.
                wa_datatab-dat04 = p41dat-dat.
                wa_datatab-dat04_period = emp_period.
            ENDCASE.
          ENDIF.
        ENDDO.
      ENDLOOP.
    ENDLOOP.

hi check this prog how to get the best performance..
report ztest.
tables:pa0002,pa0008,pa0021,pa0041.
data: begin of itab occurs 0,
      pernr like pa0002-pernr,
      vorna like pa0002-vorna,
      nachn like pa0002-nachn,
      end of itab.
data: begin of itab1 occurs 0,
      pernr like pa0008-pernr,
      begda like pa0008-begda,
      stvor like pa0008-stvor,
      ansal like pa0008-ansal,
      end of itab1.
data :begin of itab2 occurs 0,
      pernr like pa0021-pernr,
      favor like pa0021-favor,
      fanam like pa0021-fanam,
      end of itab2.
data:begin of itab3 occurs 0,
     pernr like pa0041-pernr,
     dar01 like pa0041-dar01,
     dat01 like pa0041-dat01,
     end of itab3.
data:begin of final occurs 0,
      pernr like pa0002-pernr,
      vorna like pa0002-vorna,
      nachn like pa0002-nachn,
      begda like pa0008-begda,
      stvor like pa0008-stvor,
      ansal like pa0008-ansal,
       favor like pa0021-favor,
      fanam like pa0021-fanam,
     dar01 like pa0041-dar01,
     dat01 like pa0041-dat01,
     end of final.
select-options:s_pernr for pa0002-pernr,
                     s_date for sy-datum.
select pernr
       vorna
       nachn
       from pa0002
       into table itab
       where pernr in s_pernr
       and begda le s_date-low
       and endda ge s_date-high.
select pernr
       begda
       stvor
       ansal
       from pa0008
       into table itab1
       for all entries in itab
       where pernr = itab-pernr
       and begda le s_date-low
       and endda ge s_date-high.
select pernr
       favor
       fanam
       from pa0021
       into table itab2
       for all entries in itab1
       where pernr = itab1-pernr
      and begda le s_date-low
       and endda ge s_date-high.
select pernr
       dar01
       dat01
       from pa0041
       into table itab3
       for all entries in itab2
       where pernr = itab2-pernr
       and begda le s_date-low
       and endda ge s_date-high.
loop at itab.
final-pernr = itab-pernr.
final-vorna = itab-vorna.
final-nachn = itab-nachn.
read table itab1 with key pernr = itab-pernr.
final-begda = itab1-begda.
final-stvor = itab1-stvor.
final-ansal = itab1-ansal.
read table itab2 with key pernr = itab1-pernr.
final-favor = itab2-favor.
final-fanam = itab2-fanam.
read table itab3 with key pernr = itab2-pernr.
final-dar01 = itab3-dar01 .
final-dat01 = itab3-dat01.
append final.
clear final.
endloop.
   loop at final.
   write:final-pernr ,
final-vorna ,
final-nachn ,
final-begda ,
final-stvor ,
final-ansal ,
final-favor ,
final-fanam ,
final-dar01 ,
final-dat01 .
   endloop.
regards,
venkat.

Similar Messages

  • Will using for loop decrease the performance

    Hi,
    Will using for loop with a query decrease the performance.
    for r_row in (select * from table) Loop
    end loop.
    This is done inside another for loop, most of the cases it returns only one value.
    will it decrease the peformance of the procedure.
    kindly advice.......
    Regards,
    Balu

    user575682 wrote:
    Will using for loop with a query decrease the performance.
    for r_row in (select * from table) Loop
    end loop.
    This is done inside another for loop, most of the cases it returns only one value.
    will it decrease the peformance of the procedure.Perhaps it is better to understand just what this PL/SQL loop construct does.
    PL/SQL is two languages. It is PL (programming logic code) like Pascal or C or Java. You can use a 2nd language inside it called SQL. The PL engine is clever enough to recognise when the 2nd language is used. And it compiles all the stuff that is needed for the PL engine to call the SQL engine, pass data to the SQL engine and get data back, etc. (compare this with the complexity of using the SQL language in Pascal or C or Java).
    So what does that loop do? The PL engine recognises the SQL SELECT statement. It creates an implicit cursor by calling the SQL engine to parse it (hopefully a soft parse) and then execute it.
    As part of the PL loop, the PL engine now calls the SQL engine to fetch the data (rows) from the cursor. With 10g and later, the PL engine is smart enough to use implicit bulk processing.
    Prior to 10g it used to fetch a row from the SQL engine, do the loop, fetch the next row, do the loop, etc. This means if there is a 1000 rows to fetch, it will call the SQL engine a 1000 times.
    With 10g and later it will fetch a 100 rows, store that in an internal buffer and then do the loop a 100 times. With a 1000 rows to fetch, it now only requires 10 bulk fetches instead of a 1000 single row fetches.
    These fetches require a context switch - as the PL engine has to step out and into the SQL engine and back, to fetch a row. This is an overhead and thus can become slow the more context switching there is.
    And this is the basics for this loop (and most other cursor loops) construct in PL/SQL.
    The ideal is to reduce the number of context switches. This is an overhead that can impact on performance.
    What about using a loop within a loop. Also "bad". This uses the outer loop to fetch data. This data is then used to drive the fetch in the inner or nested loop. So the outside loop pulls data from the SQL engine into PL variables. The inside loop pushes that very same data back to the SQL engine.
    Why? It would have been a lot faster no to pull and push that data between the loops using PL.
    It will be a lot faster doing it via SQL only. Write both loops as a single SQL statement and have the SQL engine directly drive these loops itself. This is called a JOIN in SQL. And the SQL engine can do it not only faster, but it has some froody algorithms that can be used that are even faster than a nested loop process (called merge joins, hash joins, etc).
    Bottom line. Maximise SQL. Minimise PL.*
    Do as much of your data crunching in SQL as possible. SQL is the best and fastest "place" to process data. Not PL (or Pascal/C/Java).

  • After update to IOS 7.1 Mobile Operator decreased the performance of Iphone 5s.

    After update to IOS 7.1 Mobile Operator decreased the performance of Iphone 5s. When  the cell of my current mobile is active Iphone 5s works so bad. It is not fast and it takes 3 seconds when you wanna enter to any section. I have changed my mobile operator and it worked fine after the change.It is so interesting that how it can happen? It happened after IOS7.1. And several people have the same problem with their Iphone 5s after update to IOS7.1. And thay all using the same mobile operator that I used before.
    I have called to the customer service of mobile operator. But they say that there is no any problem with their cell. Buit in fact a lot of people have  problem on their Iphone 5s after IOS 7.1 update and they are all using the same mobile operator

    HOTSPOT Problems with iOS 7.1
    Settings for hotspot connections have been changed by Apple at the request of some carriers.  IF your carrier is not on this list http://support.apple.com/kb/HT1937 then you cannot connect using hotspot.. Complain to your carrier

  • Decreased Battery Performance when using SL. Apple states I am alone..

    This thread is mainly aimed at people that are using a mid 2009 unibody MacBook Pro 13" or upwards that came pre-installed with Leopard. Since upgrading to Snow leopard have you noticed a significant decrease in how long the battery lasts while using the machine in the same fashion?
    Am I alone? I first reported this issue to the Dutch customer service team back in October 2009 and since then have fought it all the way to make Apple admit that there is a problem with a minority of customers. To this day according to executive customer relations, I am the only person who has reported this issue to them. I find this hard to believe as there is a mass of information/threads/blogs etc on the internet with many people complaining about the same issue.
    The following is an email I sent to the [email protected] email as a last resort.
    Dear Steve,
    I am writing to you as a last resort hoping that my complaint will be dealt with professionally as I have actually given up all hope with the Apple customer service. I do not expect that you will personally read this letter but I just trust that someone will care and pass this to someone that will treat my complaint seriously as I really am losing all faith with Apple.
    I purchased a brand new Macbook Pro 13" mid 2009 model at the end of June 2009. Around 3 weeks after I purchased the machine I received a message from Apple stating that I was eligible for a copy of Snow Leopard as it was compatible with my machine and because I had just purchased a new Mac. I upgraded the Mac to Snow Leopard without any issues. It wasn't until a few weeks later that I noticed a massive reduction in battery performance. When I ran the machine on Leopard I would easily get the advertised 7 hour battery life while doing basic web browsing with all the battery settings set to the Mac default recommended settings. On Snow Leopard I would not get anything more than 4 hours completing the same tasks.
    I contacted Apple about this and was provided with the following reference number XXXXXXXXX I was basically told that I should monitor what I was doing etc and try using the screen on the lowest setting to see if this would improve the performance, it did not. I am a busy man and work in graphic design so unfortunately I put up with the battery issue until my Hard Drive decided to die in April. I contacted Apple again about this and was again provided with a reference number XXXXXXXXXX this time I was asked to do various steps to help fix the machine which did not work. Eventually I had the machine booked in for repair. When the machine was booked in for repair I also stated that I would like the battery issue addressed once and for all as I still only get around 4 hours charge. I was told this would be looked into. After 2 weeks of having no machine (and losing out on work) I received my Mac back with a new Hard drive installed as the old one was corrupted. I asked the Apple employee if my battery had been addressed and it had not. I refused to except my machine back as the battery issue was not resolved. After another 2 weeks of not having my Mac (more loss of work on my account) I received it back this time a new battery and motherboard had been installed.
    I returned to my office and reinstalled Snow Leopard, my Adobe Master Collection and charged to 100% I then tested the machine on battery. Again I received no more than 4 hours using BELOW recommended Mac battery settings. I contacted Apple again by telephone (another 0900 number call at my expense) and was messed around left right and centre. The employee on the telephone did not know what to do so transferred me to one of the Mac level 2 agents. I have never been spoken to so rudely and was even told that the only way I could expect 7 hours battery life from a MacBook Pro 2009 model is to use it with the lid closed. Ridiculous hey? I was also even told by one of the previous customer service agents that I could try using the machine with the battery disconnected. Even more ridiculous considering it is a unibody model.
    At this point I started doing research on the issue and found that I was far from alone with the battery issue. I have found numerous people suffering from the same issue. Below are a few links containing the same issue.
    http://discussions.apple.com/thread.jspa?messageID=10337524&#10337524
    http://discussions.apple.com/thread.jspa?messageID=11365892&#11365892
    http://forums.cnet.com/5208-21565_102-0.html?threadID=357366
    At this point I decided to try something different, something that was not recommended or mentioned by any Apple employee, sales or technical. I decided to reformat the HD and install Leopard back on the on the machine. I then completed a battery test and low and behold my 7 hours of battery life were fully back. I think this can safely say that the issue is clearly with the OSX and not the hardware.
    I then contacted Apple customer service by phone (more 0900 numbers at my expense) I spoke to a senior Applecare advisor called XXXXX XXXXXXXX and explained my issue in full. I told xxxxxxx that I wanted this matter looking into and that I wanted a machine that would give me what is advertised using Snow Leopard, as know where on the Apple site or in the Snow Leopard documentation does it state ' Expect to lose 3 hours '
    I provided xxxxxxxx with a system info file and he sent it the Apple engineering team. A week went by and I received an email from him with the report from engineering. Engineering basically blamed it ALL on 3rd party applications, they even blamed it on the weather widget stating that it is constantly updating and will drain power. My remote access software was also blamed which was not even running in the background.
    1: The weather widget updates when you select it not constantly.
    2: The weather widget is by DEFAULT installed on a machine so thus would be classed as an Apple product in my opinion.
    That evening I decided to reformat my HD and reinstall Snow Leopard. This time I installed ONLY Apple software updates and nothing else. I then tested the battery again (getting very boring now) using the same settings as previous tests. This time I managed to have 4 hrs and 15 mins. Just 15 minutes more than what I had previously had. I then contacted xxxxxxx again and provided him with another system information file from the clean install. I explained that I had tested this with just the airport on and basic web browsing on various sites (my exact words) Another week went by and I received a call from xxxxxxx with his report from engineering. He said that Engineering wanted to know if I had tested this with basic web browsing or sat on Youtube or other flash based video streaming sites for 4 hours as this could reduce the battery life.
    As you could imagine I was furious. I repeated myself to xxxxxxx about my tests and was told that he would go back to engineering. I received another call from xxxxxxx stating that engineering are looking into it. I asked how long it would take for an answer on this and we agreed on a 2 week time frame. It is now over 2 weeks and I have sent 2 emails to xxxxxx and still have not received a reply.
    This issue has been going on since October 2009 when I first reported it. We are now in July 2010 and I am still suffering with this, as you can imaging this is unacceptable and not what one would expect from a company like Apple. My complaints summarized are below, I believe the obvious speak for themselves.
    1: There is no disclaimer on the Apple site stating that Snow Leopard will decrease the performance of a battery on a machine that did not come preinstalled with Snow Leopard. Neither is this information provided on the installation PDF instructions that come with the Snow Leopard disc.
    2: If there were such a disclaimer on the Apple site then why would I have my battery and motherboard replaced by the Apple repair team when there was clearly nothing wrong with them in the first place. Why was I never told this by any agent on the phone or in the Mac store? The answer seems clearly that this information is not available to the public or to Apple staff which is a big waste or my time as well as theirs.
    3: I have missed out on work because of having my Mac in for repair for a total of 4 weeks. As mentioned above there was clearly no need to have had the battery or motherboard replaced.
    4: I have spent money calling the 0900 numbers on numerous occasions simply getting passed around from Apple employee to Apple employee and still have no answer to my problem.
    5: I have wasted so much of my own time clean erasing my hard drive including zero out of sectors and reinstalling operating systems, not to mention other software and Apple updates. All of this comes to many hours of total wasted time at my expense when I could have been working.
    Where we stand now is that I am on the verge of taking legal proceedings with the Dutch Consumentenbond as this machine is not suitable to run with the Snow Leopard OSX when Apple advertise that it is.
    I expect either a full refund of my MacBook Pro 13" mid 2009 or an exchange for a Macbook Pro 13" that comes with Snow Leopard preinstalled with the disc in the box. I also expect to be compensated for my loss of time, money I have spent on the phone to Apple and the loss of work while the machine was in for unnecessary repair.
    I am really at the end of my patience with this issue and feel that I have been much more than fair with my reports, honesty and patience.
    I trust to hear from somebody soon regarding this issue so that we can finally put it to a close once and for all in a professional manor.
    Regards
    I received a phone call within 14 hours of sending the email from executive customer relations. They came back with new information from engineering but did not think it was acceptable as engineering were now blaming my battery decrease on the assumption that my apartment might be too hot this causing the CPU to run at a higher temperature making the battery decrease quicker. We both agreed that it was an unacceptable answer.
    The day after I received another call from them stating that engineering had now finished tests and came to the conclusion that when testing on Leopard and Snow Leopard on the MacBook Pro 2009 there was no difference in battery run time whats so ever. I found this hard to believe so asked exactly how the test was conducted. Was it conducted in the same fashion that I had spent the last 9 months talking about. ' Using below default energy saving settings with only airport on while completing basic web browsing '???
    They confirmed this was not the case, engineering had basically turned the machines on, turned the screen right down to 1 bar and left them on screen saver over night. As you can imaging I was speechless (for a few seconds)
    Apple seem consistent on NOT admitting that there is an issue with battery performance for a minority of customers. As is stands now engineering in Europe have now passed the case over to engineering in the US for further ' in-depth ' tests.
    I know there are people out there that are suffering the same issues as myself and I welcome you to please contact me with your experiences. As the more of us that complain about this make it harder for Apple to deny this and brush it under the carpet.
    Please feel free to reply to this thread or email me directly on [email protected]

    Thomas A Reed wrote:
    I mean this in the kindest way but please read the post
    Please, nobody's going to waste their time reading all that! I don't know what you possibly could have said about this issue that took up so much space, but if you can't express it more concisely, it's probably not worth reading.
    I have used SL on both a unibody MBP and an older MBP. On the older MBP, when I upgraded from Leopard to SL, I got a noticeable increase in battery life immediately. I have no such comparison on the unibody MBP, since it had SL installed to begin with, but I'll put it this way: I haven't come close to running out of power on it. I used it once for about 4 hours and still had more than a 1/3 charge. I could have easily used it for another couple hours, at least. And this was with a 17" MBP, which uses more power than your 13", and without much in the way of battery-saving going on. (Screen at full brightness, AirPort on and in use, Bluetooth on, etc.)
    It's difficult to say that SL is the problem when it clearly isn't for everyone. What your problem is, I don't know, but maybe if you posted a more concise question you'd get some answers.
    I think ..
    This thread is mainly aimed at people that are using a mid 2009 unibody MacBook Pro 13" or upwards that came pre-installed with Leopard.....
    at the beginning of the thread I made it pretty clear, if you are not affected by this then I'm happy for you, but then the thread is clearly not aimed at you. I can guarantee that I have tested this exactly the same way I did with Leopard and there is a significant decrease. I also know there are people out there that have gained battery life but there have also been many threads containing people who have lost battery life.

  • How to increase the performance with the case structure?

    Hiii, All
                I want to stop the looping into my vi, which is occuring because of Case structure, as i ve shown in the figure, i am checking for the trigger, either it is Manual or it is Auto, if auto i am going inside the case and checking the loop of either Auto trigger is for Analog values or for digital values, if it is for analog valus, i am checking the set point that, either P.V. has cross the setpoint or not? if it is then i am starting to write the file and the control comes out again to check the Start trigger again, either it is Auto or manual? and because of these contonuous loops inside the while loop, my other while loops inside the vi, decrease the performance mean they are slowing down also with the current while loop, so i think solution is to stopping these nested loops, but what should i do to stop these nested loops? please suggest something.
    Thanks in Advance,
    Nishant
    Attachments:
    Performance.jpg ‏169 KB

    You can consider multithreading the single loop and using a synchronization resource to communicate between threads.  You should also consider cutting down on the global variable dependancies which makes the code hard to follow.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Make the relationship in between multiple table storage's tables will affect the performance

    Hi,
    i'm going to develop business application,the product ID needs to be generic one and it should automatically generate the unique id(like identity in sql ) but,it has to be generate in formatted way 
    for example the ID would be "cityCode+areaCode+uniqueNumber" . here, cityCode and areaCode are going to maintain in separate table. while generate the product id, going to find the cityCode table and AreaCode table the generate  unique
    number by merge all the respective information.
    1) while doing all this will affect the performance Azure table storage performance and  web application ?
    2) making multiple relationship among multi-Table Storage will decrease the performance ?. 

    Hello,
    When you say tables, are referring to Azure Storage Tables or Relational Databases?
    Please note Windows Azure tables do not function in the same manner as tables in a relational database since they do not make use of relationships or have schemas.
    And if you are referring to relational databases, the latency in performance would depend on the logic used to generate the unique ID.
    You should be able to use the logic in an On-Prem SQL database and check for the latency.
    Regards,
    Malar.

  • Enhance the performance of FM!

    Hi,
    I have a FM which is using  inner Join statement from four DB tables for extracting selected fields into an Internal table as shown below:
    select ofield1 pfield2 tfield3 cfield4
    ( and so on upto approximately 30 fileds )
    into 
    (Itab-filed1, itab-field2, itab-field3, itab-field4, and so on ) from
    DB1 as o inner join
    DB2  as p on 0field1 = Pfield1 left join
    DB3 as c on pfield2 = cfield2 and
                       Pfield3 = cfield3  left join
    DB4  as t on pfield4 = tField4
            and  pfield5 = tfield5
    where conditions----
    Since the Join statements are really decreasing the performance, task now is to increase the performance by removing select and end select.
    Any ideas?
    Raj

    *Code to demonstrate select command
    *Code to demonstrate select into internal table command
    TYPES: BEGIN OF t_bkpf,
    include structure bkpf.
      bukrs LIKE bkpf-bukrs,
      belnr LIKE bkpf-belnr,
      gjahr LIKE bkpf-gjahr,
      bldat LIKE bkpf-bldat,
      monat LIKE bkpf-monat,
      budat LIKE bkpf-budat,
      xblnr LIKE bkpf-xblnr,
      awtyp LIKE bkpf-awtyp,
      awkey LIKE bkpf-awkey,
    END OF t_bkpf.
    DATA: it_bkpf TYPE STANDARD TABLE OF t_bkpf INITIAL SIZE 0,
          wa_bkpf TYPE t_bkpf.
    TYPES: BEGIN OF t_bseg,
    *include structure bseg.
      bukrs     LIKE bseg-bukrs,
      belnr     LIKE bseg-belnr,
      gjahr     LIKE bseg-gjahr,
      buzei     LIKE bseg-buzei,
      mwskz     LIKE bseg-mwskz,         "Tax code
      umsks     LIKE bseg-umsks,         "Special G/L transaction type
      prctr     LIKE bseg-prctr,         "Profit Centre
      hkont     LIKE bseg-hkont,         "G/L account
      xauto     LIKE bseg-xauto,
      koart     LIKE bseg-koart,
      dmbtr     LIKE bseg-dmbtr,
      mwart     LIKE bseg-mwart,
      hwbas     LIKE bseg-hwbas,
      aufnr     LIKE bseg-aufnr,
      projk     LIKE bseg-projk,
      shkzg     LIKE bseg-shkzg,
      kokrs     LIKE bseg-kokrs,
    END OF t_bseg.
    DATA: it_bseg TYPE STANDARD TABLE OF t_bseg INITIAL SIZE 0,
          wa_bseg TYPE t_bseg.
    *Select directly into an internal table
    SELECT bukrs belnr gjahr buzei mwskz umsks prctr hkont xauto koart
           dmbtr mwart hwbas aufnr projk shkzg kokrs
      FROM bseg
      INTO TABLE it_bseg.
    Select directly into an internal table where fields are in a
    different order or not all fields are specified
    SELECT bukrs belnr gjahr buzei mwskz umsks prctr hkont xauto koart
           dmbtr mwart hwbas aufnr projk shkzg kokrs
      FROM bseg
      INTO CORRESPONDING FIELDS OF TABLE it_bseg.
    *Select... endselect command
    SELECT bukrs belnr gjahr buzei mwskz umsks prctr hkont xauto koart
           dmbtr mwart hwbas aufnr projk shkzg kokrs
      FROM bseg
      INTO wa_bseg.
      APPEND wa_bseg TO it_bseg.
    ENDSELECT.
    *Select FOR ALL ENTRIES command
    SELECT bukrs belnr gjahr bldat monat budat xblnr awtyp awkey
      UP TO 100 ROWS
      FROM bkpf
      INTO TABLE it_bkpf.
    IF sy-subrc EQ 0.
    The FOR ALL ENTRIES comand only retrieves data which matches
    entries within a particular internal table.
      SELECT bukrs belnr gjahr buzei mwskz umsks prctr hkont xauto koart
             dmbtr mwart hwbas aufnr projk shkzg kokrs
        FROM bseg
        INTO TABLE it_bseg
        FOR ALL ENTRIES IN it_bkpf
        WHERE bukrs EQ it_bkpf-bukrs AND
              belnr EQ it_bkpf-belnr AND
              gjahr EQ it_bkpf-gjahr.
    ENDIF.

  • Many extend decrease performance?

    hallo,
    it is thru, if a segment is fragmented in many extend, then performance decrease?
    if yes, what is a threshold?
    if 10 is the threshold, this query:
    SELECT SEGMENT_NAME, BYTES, BLOCKS, EXTENTS FROM DBA_SEGMENTS
    WHERE OWNER='xxxxx' AND EXTENTS>10 ;
    show "bad" segment?
    Thanks in advance

    Multiple extents would only affect the performance of full table scans since single block IO is used for key access to an index and indexed access to a table block from an indexed key.
    With a full table scan the number of extents only affects DML IO performance if the extent size is not an even multiple of the multiblock extent size since a extra IO is now required to get the odd blocks.
    Example 64K multi-block IO size. If the table is in 100 64k extents it will take 100 IO requests to read the table. If the table is in a single 6400k extent it will take 100 IO requests to read the table. Since 100 = 100 the performance is the same.
    I did not follow the link but there should be a proof at Tom's site. It isn't very hard to run this test and check the IO statistics oneself.
    HTH -- Mark D Powell --

  • Improve the Performance of Loops

    Has anyone read "Improve the Performance of Loops" on http://archive.devx.com/free/tips/tipview.asp?content_id=3945 ?
    If so, would you agree that what's written there is absolute b.....t?
    He claims that decreasing the counter improves the performance and tries to prove it with the program:
    for (int i=0,n=Integer.MAX_VALUE;i<n;i++){
    a =-a;
    // is slower than
    long midTime =System.currentTimeMillis();
    for (int i=Integer.MAX_VALUE-1 ; i>=0 ; i--){
    a =-a;
    }The result is pretty impressive:
    Increasing Loop:4891
    Decreasing Loop:3781
    The only stupid thing is that:
    1. if you run it more times you get
    Increasing Loop:4891
    Decreasing Loop:3781
    Increasing Loop:3782
    Decreasing Loop:3796
    Increasing Loop:3891
    Decreasing Loop:3891
    Increasing Loop:3828
    Decreasing Loop:3937
    Increasing Loop:3891
    Decreasing Loop:3906
    Increasing Loop:3860
    Decreasing Loop:3937
    Increasing Loop:3891
    Decreasing Loop:3906
    So you can see that the performance is worse for decreasing loops after hotspot warmed up.
    2. If you run it with -server, you'll even get:
    Increasing Loop:16
    Decreasing Loop:0
    Increasing Loop:0
    Decreasing Loop:0
    Increasing Loop:0
    Decreasing Loop:0
    Increasing Loop:0
    Decreasing Loop:0
    Increasing Loop:0
    Decreasing Loop:0
    Increasing Loop:0
    Decreasing Loop:0
    Increasing Loop:0
    Decreasing Loop:0
    This shows that hotspot sever is much more clever than some programmers.
    Even if you change the code to do something bit better like
        public TimeLoop() {
            int a = 2,b=2;
            long startTime = System.currentTimeMillis();
            for (int i = 0, n = Integer.MAX_VALUE; i < n; i++) {
                a ^= i;
            long midTime = System.currentTimeMillis();
            for (int i = Integer.MAX_VALUE - 1; i >= 0; i--) {
                   a ^= i;
            long endTime = System.currentTimeMillis();
            System.out.println("Increasing Loop:" + (midTime - startTime));
            System.out.println("Decreasing Loop:" + (endTime - midTime));
              System.out.println("a="+a+" b="+b);      // Hotspot must perform _some_ kind of calculation to print this          
        }You'll find that it doesn't really matter whether you're xoring in increasing or decreasing order.
    For -client:
    Increasing Loop:296
    Decreasing Loop:297
    a=2 b=2
    Increasing Loop:297
    Decreasing Loop:281
    a=2 b=2
    Increasing Loop:297
    Decreasing Loop:297
    a=2 b=2
    For -server:
    Increasing Loop:141
    Decreasing Loop:156
    a=2 b=2
    Increasing Loop:141
    Decreasing Loop:141
    a=2 b=2
    Increasing Loop:140
    Decreasing Loop:156
    a=2 b=2
    (Last three runs for each).
    And I don't believe that accessing array.length is slower than storing the length in an int and comparing against that int!
    Please let's just stop posting silly perfomance tuning tips!

    Well, you can always look at the bytecode produced. I wrote two little classes:public class t {
      public static void main ( String[] args ) {
        int a = 0;
        for (int i=0,n=Integer.MAX_VALUE;i<n;i++){ a =-a; }
    }andpublic class t1 {
      public static void main ( String[] args ) {
        int a = 0;
        for (int i=Integer.MAX_VALUE-1 ; i>=0 ; i--){ a =-a; }
    }And here's the bytecode for their main() methods. (Extra/different bytecodes in "t" are marked):t: (incrementing)Method void main(java.lang.String[])
       0 iconst_0
       1 istore_1
    ==>2 iconst_0
       3 istore_2
       4 ldc #2 <Integer 2147483647>
       6 istore_3
       7 goto 16
      10 iload_1
      11 ineg
      12 istore_1
      13 iinc 2 1
      16 iload_2
    ==>17 iload_3
    ==>18 if_icmplt 10
      21 return
    t1: (decrementing)
    Method void main(java.lang.String[])
       0 iconst_0
       1 istore_1
       2 ldc #2 <Integer 2147483646>
       4 istore_2
       5 goto 14
       8 iload_1
       9 ineg
      10 istore_1
      11 iinc 2 -1
      14 iload_2
      15 ifge 8
      18 return The decrementing code does use fewer bytecodes to do its thing.
    However, as someone pointed out - once Hotspot gets involved, all bets are off. And as someone else pointed out, if the body of the loop does nearly anything at all, the 2-bytecode-difference is going to get completely swamped.
    In general, this is the kind of micro-optimizing that I'd ignore completely...
    Grant

  • About how many CDs can I put on my hard drive before it effects the performance of me iMac/

    About how many CDs can I put on my hard drive before they effect the performance of my imac?

    Well, it depends on how much content is on the CD. You should have, at a minimum 10 - 15 GB of empty hard drive space at all times - more is much better. I do a fair amount of video/graphics editing and in order to render and burn properly, I need at least as much empty hard drive space as I have files in my current project, which usually means at least 150 GB or more. So, to be safe, my goal is to have a minimum of 250 GB empty space at all times - the OS will thank you if it has more room to work with.
    So, add up what you want to put there and keep watching your hard drive space diiminish - it's best to have space hogging files on an external hard drive to keep your internal working well.

  • How to avoid the loop inside the loop? as it reduces the performance.

    hi masters,
    i have 2 internal tables having 1 same field. eg table itab having f1, f2, f3 fields and itab1 having f1, f4 and f5 fields. let us consider the data in the itab and itab1 is like below given
    itab-f1   itab-f2   itab-f3                 itab1-f1     itab1-f4   itab1-f5
    10        aa         11                      10             abc       456
    10        bb         15                      10             def        655
    10        ff           13                      10             ghi        456
    11        dd         16                      10             tre         455
    11        zz         24                      11             ftr          256
    11        ii           54                      11             kjh         556
    12        hh         24                      12             fjk          751
    now i want the result in final table like below
    f1         f2       f3         f4         f5
    10        aa      11      abc      456
    10        aa      11      def       655
    10        aa      11      ghi       456
    10        aa      11      tre       455
    10        bb      15      abc      456
    10        bb      15      def       655
    10        bb      15      ghi       456
    10        bb      15      tre       455
    10        ff        13      abc      456
    10        ff        13      def      655
    10        ff        13      ghi      456
    10        ff        13      tre       455
    11        dd      16      ftr        256
    11        dd      16      kjh      556
    11        zz      24      ftr       256
    11        zz      24      kjh      556
    11        ii        54      ftr       256
    11        ii        54      kjh      556
    12        hh      24      fjk       751
    i can get this result using the
    Loop at itab.
    loop at itab1 where f1 = itab-f1.
    process....
    endloop.
    endloop.
    but it is very slow. i want to avoid this loop inside the loop and i want to implement the same program using read table.. like below..
    Loop at itab.
    Read table itab1 with key ....
    process...
    endloop.
    Is it possible? to get multiple records from itab2 using read statement or with READ statement that using CASE Statement or IF statemetnt.
    Plz help me...

    hi,
    please try the following code
    TYPES:
      begin of ty_itab2,
       f1
       f2
       f3
       f4
       f5
      end of ty_itab2.
    DATA:
      lw_tab2tmp type ty_itab2,
      lt_tab2tmp type standard table of ty_itab2.
    sort it_itab by f1.
    loop at it_itab into lw_itab.
      at new f1.
        CLEAR lt_tab2tmp[].
        loop at it_itab1 into lw_itab1 where f1 = lw_itab-f1.
          CLEAR lw_tab2tmp.
          move-corresponding lw_itab1 to lw_tab2tmp.
          append lw_tab2tmp into lt_tab2tmp.
        end loop.
        "while there is no data with f1 in it_itab1
        if lt_tab2tmp is initial.
          lw_tab2tmp-f1 = lw_itab-f1.
          append lw_tab2tmp into lt_tab2tmp.
        endif.
      end at.
      CLEAR lw_tab2tmp.
      MOVE-CORRESPONDING lw_itab to lw_tab2tmp.
      modify lt_tab2tmp from lw_tab2tmp TRANSPORTING f2 f3 where not f1 is initial.
      append lines of lt_tab2tmp into lt_itab2.
    end loop.
    lt_itab2 is the final table.
    There may be some syntactically errors.
    I have not a system to test it now, please test it.

  • How to improve af:popup performance and decrease the popup opening time?

    Hi All,
    I am trying to open a popup on mouse over of af:commandImageLink. Popup is opening properly but its taking quite some time for loading and opening. As I am opening af:menu component which is enclosed in af:popup on mouse over of af:commandLink I need memu to be opened immediately as soon as user places mouse over commandImageLink component.
    Is there any way we can decrease the popup opening time?
    Below is code snippet using for command Link and popup:
    Step1:
    <af:commandImageLink text="#{aaa.Data}" binding="#{navigationUtilBean.DataMenu}" icon="/images/MenuArrow_final.png"
    iconPosition="trailing">
    <af:showPopupBehavior popupId="::DataPopup"
    triggerType="mouseOver"
    align="afterStart"/>
    <af:clientListener method="onMouseOver" type="mouseOver" />
    </af:commandImageLink>
    Step2:
    <af:popup id="DataPopup" contentDelivery="immediate" animate="false" clientComponent="true"
    launcherVar="source" eventContext="launcher">
    <af:menu>
    <af:group>
    <af:commandMenuItem icon="/images/DropDownMenuArrow.png" text="#{aaa.Data}" inlineStyle="width:100px;"
    action="#{navigationUtilBean.conTimeIntervalAction}"
    actionListener="#{halfHSubDataSelectionBC.fetcAAHData2Accounts}"
    />
    </af:group>
    <af:group>
    <af:commandMenuItem text="#{aaa.NON_Data}" icon="/images/DropDownMenuArrow.png"
    action="#{navigationUtilBean.nonTimeIntervalAction}"
    actionListener="#{nonAASubDataSelectionBC.fetchNonAADataAccounts}" />
    </af:group>
    </af:menu>
    <af:clientListener method="popupClosedListener" type="popupClosed" />
    <af:serverListener type="serverPopupClosed" method="#{navigationUtilBean.serverPopupClosedListener}" />
    </af:popup>
    Edited by: 940044 on Jun 12, 2012 3:04 AM

    Hi,
    Welcome to OTN.
    As per the tag doc,
    The "mouseOver" or "mouseHover" event types have a built in 500-millisecond launch delay that is implicitly canceled if a "mouseOut" event is triggered for the same component within the delay period.http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showPopupBehavior.html
    I don't think you can change that 500 millisecond delay.
    -Arun

  • Hi all.When pressed play and make some changes in loop (eg fade in fade out) are very slow to implement, and also the loops from the library are very slow to play, corrects the somewhat self so is the Logic??

    hi all.When pressed play and make some changes in loop (eg fade in fade out) are very slow to implement, and also the loops from the library are very slow to play, corrects the somewhat self so is the Logic??

    Hey there Logic Pro21,
    It sounds like you are seeing some odd performance issues with Logic Pro X. I recommend these troubleshooting steps specifically from the following article to help troubleshoot what is happening:
    Logic Pro X: Troubleshooting basics
    http://support.apple.com/kb/HT5859
    Verify that your computer meets the system requirements for Logic Pro X
    See Logic Pro X Technical Specifications.
    Test using the computer's built-in audio hardware
    If you use external audio hardware, try setting Logic Pro X to use the built-in audio hardware on your computer. Choose Logic Pro X > Preferences > Audio from the main menu and click the Devices tab. Choose the built in audio hardware from the Input Device and Output Device pop-up menus. If the issue is resolved using built-in audio, refer to the manufacturer of your audio interface.
    Start Logic with a different project template
    Sometimes project files can become damaged, causing unexpected behavior in Logic. If you use a template, damage to the template can cause unexpected results with any project subsequently created from it. To create a completely fresh project choose File > New from Template and select Empty Project in the template selector window. Test to see if the issue is resolved in the new project.
    Sometimes, issues with the data in a project can be repaired. Open an affected project and open the Project Information window with the Project Information key command. Click Reorganize Memory to attempt to repair the project. When you reorganize memory, the current project is checked for any signs of damage, structural problems, and unused blocks. If any unused blocks are found, you will be able to remove these, and repair the project. Project memory is also reorganized automatically after saving or opening a project.
    Delete the user preferences
    You can resolve many issues by restoring Logic Pro X back to its original settings. This will not impact your media files. To reset your Logic Pro X user preference settings to their original state, do the following:
    In the Finder, choose Go to Folder from the Go menu.
    Type ~/Library/Preferences in the "Go to the folder" field.
    Press the Go button.
    Remove the com.apple.logic10.plist file from the Preferences folder. Note that if you have programmed any custom key commands, this will reset them to the defaults. You may wish to export your custom key command as a preset before performing this step. See the Logic Pro X User Manual for details on how to do this. If you are having trouble with a control surface in Logic Pro X, then you may also wish to delete the com.apple.logic.pro.cs file from the preferences folder.
    If you have upgraded from an earlier version of Logic Pro, you should also remove~/Library/Preferences/Logic/com.apple.logic.pro.
    Restart the computer.
    Isolate an issue by using another user account
    For more information see Isolating an issue by using another user account.
    Reinstall Logic Pro X
    Another approach you might consider is reinstalling Logic Pro X. To do this effectively, you need to remove the application, then reinstall Logic Pro X. You don't have to remove everything that was installed with Logic Pro X. Follow the steps below to completely reinstall a fresh copy of Logic Pro X.
    In the Finder, choose Applications from the Go menu.
    Locate the Logic Pro X application and drag it to the trash.
    Open the Mac App Store
    Click the Purchases button in the Mac App Store toolbar.
    Sign in to the Mac App Store using the Apple ID you first used to purchase Logic Pro X.
    Look for Logic Pro X in the list of purchased applications in the App Store. If you don't see Logic Pro X in the list, make sure it's not hidden. See Mac App Store: Hiding and unhiding purchases for more information.
    Click Install to download and install Logic Pro X.
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • Regarding the performance of the Transaction F.01 Program RFBILA00

    Hi Everyone,
    We are running the transaction F.01for financial statements. The program is RFBILA00. We are facing the performance issue with this program. The version is ECC 6.0
    Is there any solution to reduce the running time of this program. We are not using the business area.
    Thanks,
    Senthil

    1.Run time analysis transaction SE30
    This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    2.SQL Trace transaction ST05
    The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Or can use load balancing servers for user over load.

  • Tip: Improving The Performance Of OLAP DML Table Inserts

    Quick Oracle OLAP Tip:
    If you need to write the contents of a variable, or a group of variables, to a relational table, you would normally use the SQL INSERT command. Normal practice is to loop round all of the variables' dimension values, inserting the variable values into the relational tables one by one, until the variable has been completely loaded into your database table.
    Oracle 9i OLAP however introduces two new commands, SQL PREPARE and SQL EXECUTE (http://download-west.oracle.com/docs/cd/B10501_01/olap.920/a95298/sql5.htm#1027902) , that allow us to prepare our INSERT statement in such a way that it uses bind variables to pass values to the Oracle tables. Bind variables are generally a 'good thing' and reduce the amount of time Oracle has to spend parsing your SQL insert statements. In addition, you can specify additional options with SQL PREPARE to specify 'direct path' insertions (quicker as they bypass the normal SQL engine and directly load data into Oracle blocks), nologging (to eliminate redo log generation), and to nominate individual partitions to load data in to. It's worth noting that there's an error in the current OLAP DML documentation that suggest that any OLAP DML insert operation into an Oracle table locks the entire table, preventing other AW processes from inserting into the table until you commit. This is actually incorrect, and full-table locking only occurs if you use the DIRECT=YES option, which locks the table in the same way that SQL*Loader locks the table as they both use the Direct Path API.
    However, an even better solution than using SQL EXECUTE and SQL PREPARE is to use the OLAP_TABLE feature in Oracle 9i (http://download-west.oracle.com/docs/cd/B10501_01/olap.920/a95295/olap_tab.htm#73729) to create a view against your AW variable, then use this view as the source for a "INSERT INTO table SELECT * FROM source" SQL statement, optionally using the /*+ INSERT APPEND */ option if you want to carry out direct path insertions. By using OLAP TABLE and having the SQL engine insert multiple variable values into our target table, rather than having an OLAP DML program loop through the variable and carry out multiple single-row insertions, we were able to increase our write performance by an order of magnitude compared to our earlier SQL INSERT command. One thing to bear in mind though is that, if you are running many copies of the program concurrently, using direct path insertions may well cause lock contention, as each process will obtain an exclusive table lock while the direct insertion takes place. In the case of concurrent processes, it may be better to use conventional path insertions (but still use SQL PREPARE and EXECUTE, or OLAP TABLE) as these only require row-level exclusive locks.

    you can use Execution plain
    http://stackoverflow.com/questions/7359702/how-do-i-obtain-a-query-execution-plan
    and add index.
    Index according to the fields you ask queries can improve performance greatly larger!
    You can use the statistics for building indexes:
    http://www.mssqltips.com/sqlservertip/2979/querying-sql-server-index-statistics/
    Tzuri Ben Ezra | My Certifications:
    CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP |
    FaceBook: Tzuri FaceBook | vCard:
    Tzuri vCard | 
    Microsoft ID:
    Microsoft Transcript 
     |

Maybe you are looking for

  • How to set the margin of a jtextfield when using standard lineborder

    Hi, I want to give my jtextfield a custom inset. The problem is that I also use a lineborder which controls the inset, thus when I try to the setMargin method, it doesn't work. Can anyone tell me how to do this? Much thanks Hugo Hendriks

  • Airplay - iPhone 4

    Will the iPhone 4 (5.1) be able to control the new Apple TV through airplay? I have the 1st gen Apple TV at the moment and airplay isn't working (it only works through the laptop if it's on) thanks

  • Regarding creating Excise Licence

    Hi Gurus, I am facing an error  "Enter valid sold to party/ship to party" while creating licence in T Code J1ILIC01. I have created a customer in Foreign Location and maintained data in J1ID. Till I am facing the problem. Kindly guide me. Thanks in a

  • Title screens in slide shows

    How do I make the titles bigger in the slideshow? Can I set it up so that the titles appear on top of the photo? I only see them come up in the upper left corner very small.

  • Where do i get tuxedo linux version.....

    i want to download Bea Tuxedo 8.0 for Redhat linux advance server 3, where should i download it??? Junaid akbar