Backing up tablespaces on different schedules

I was reading up on backup strategies, and came across the following:
"More frequent backups of heavily-used datafiles can shorten recovery times in some situations. "
This sounds strange when it comes time to recovering with RMAN. If I backed up the SYSTEM tablespace daily, and the whole database Sundays:
If I had to restore & recover the database on a Friday, would RMAN use the Sunday backup & redo to roll forward everything but the SYSTEM tablespace, for which it would use the Thursday backup? And would I specify this behavior or would RMAN just recognize it and perform it automatically?
-Chuck

I was reading up on backup strategies, and came
across the following:
"More frequent backups of heavily-used datafiles can
shorten recovery times in some situations. "
This sounds strange when it comes time to recovering
with RMAN. If I backed up the SYSTEM tablespace
daily, and the whole database Sundays:
r.- Really to backup every day the tablespace SYSTEM is not a fantastic strategy because that tablespace is not to store user segments although you can do it. Really the tablespace SYSTEM does not increment its percentage of used a lot.
If I had to restore & recover the database on a
Friday, would RMAN use the Sunday backupr.- Yes
& redo tor.- Not the Redos, It is going to use the archives
roll forward everything but the SYSTEM tablespace,
for which it would use the Thursday backup? And would
I specify this behavior or would RMAN just recognize
it and perform it automatically?
-Chuckr.- RMAN is going to restore the last full backup and it is going to apply the archives and it is going to get help from the incremental backups done during the week.
Joel Pérez
http://otn.oracle.com/experts

Similar Messages

  • My time machine backs up over 40GB each scheduled back up when there hardly any new data to back up. I have excluded movies

    My time machne backs up over 40GB each scheduled backup of data even if there is no new data to back. The time capsule is 2TB. I have excluded in preferences iPhoto liabrary and movies and VM fusion and it still wants to back make eacj back up 40MG+. What can I do?

    Find out what is actually being backed up .. that way you can exclude it.
    http://pondini.org/TM/D4.html
    Pondini mentions here how to find the program or files that are causing the problem.

  • How to produce different outbound delivery based on different schedule line

    Hi,
    I want to create different outbound delivery based on different schedule line time,but system automatically create a combining delivery document with a sum number.
    For example,
    schedule line
    date               goods issue time   qty
    2011.08.24     08:00:00                1
    2011.08.24     10:00:00                1
    when I create the outbound delivery, system create only one document with quantity 2.
    But I need two documents with quantity 1 in every document.
    How to solve this requirement?
    Thanks.

    Hi,
    I viewed the item requirement in VOFM, found that they are status check for the copy control, not the split control.
    Could you please give me a example?
    In the copy control--header--conditions----order requirement ( or combination requirement )
    They are like this :
    (001)
      bp_subrc = 0.
    Check that reference document is an order (if not, issue error)
      if cvbak-vbtyp cn vbtyp_auft.        "Auftrag?
        perform message_handling in program (programmname)
                                           using cvbap-posnr
                                             '003'
                                             'E'
                                             'VL'
                                             cvbak-vbeln
                                             space
                                             space
                                             space.
        bp_subrc = 1.
        check 1 = 2.
      endif.
    Check the status of the Fonds-Management
      IF CVBUK-FMSTK EQ 'A'.
        PERFORM MESSAGE_HANDLING IN PROGRAM (PROGRAMMNAME)
                                           USING CVBAP-POSNR
                                             '889'
                                             'E'
                                             'VL'
                                             CVBAK-VBELN
                                             SPACE
                                             SPACE
                                             SPACE.
        BP_SUBRC = 1.
        CHECK 1 = 2.
      ENDIF.
    Check that order is not blocked by the automatic credit check
      if cvbuk-cmgst ca 'B' and
         cvbuk-abstk ne 'C'.
    Credit check is irrelevant for correction deliveries
        if v50agl-sofauftrag eq charx       and
           tvak-lisof       eq space       and
           likp-lfart       eq tvak-korli.
        else.
          perform message_handling in program (programmname)
                                             using cvbap-posnr
                                               '060'
                                               'E'
                                               'VL'
                                               cvbak-vbeln
                                               space
                                               space
                                               space.
          bp_subrc = 1.
          check 1 = 2.
        endif.
      endif.
    Check the user status from the order header
      if not cvbak-objnr eq space.
        call function 'SD_STATUS_VBAK_CHECK_INTERN'
          exporting
            i_objnr              = cvbak-objnr
            i_vrgng              = vrgng_sddn
          exceptions
            allowed_with_warning = 01
            not_allowed          = 02
            object_not_found     = 03
            others               = 99.
        if sy-subrc ne 0.
    Fehler nicht bei MODKZ = '2' (Erlaubt mit Warnung)
          if sy-subrc gt 1.
            bp_subrc = 7.
    Else ist nötig, da Routine mit "changing sy-subrc" gerufen wird
          elseif sy-subrc eq 1.
            bp_subrc = 0.
          endif.
    Check Global delivery flags
    line deleted: "n_911988
            perform message_handling in program (programmname)
                                               using cvbap-posnr
                                                     sy-msgno
                                                     sy-msgty
                                                     sy-msgid
                                                     sy-msgv1
                                                     sy-msgv2
                                                     space
                                                     space.
    Bei Fehler: Bedingung verlassen
          check bp_subrc ne 7.
        endif.
      endif.

  • Transportable tablespace accross different oracle versions

    Hi
    Do I need same oracle versions if I want to transport tablespaces ?
    i.e Can I transport tablespaces from oracle9i to oracle 11g ? or from oracle 10g to oracle 11g ?
    I read the documents however Im still confused.

    Thanks, I have read the document and notice that from oracle 10g and onwards I can transport tablespaces accross different oracle versions.
    I think we can change the endian format via rman hence no need to have same endian format
    "Beginning with the Oracle10g database, a tablespace can always be transported to a database with the same or higher compatibility setting, whether the target database is on the same or a different platform."

  • Database Tablespaces with different block sizes...

    Hi ,
    What are the pros and cons of setting different block sizes to tablespaces, and where may be this useful???
    Thanks,
    Simon

    http://asktom.oracle.com/pls/ask/f?p=4950:8:101384681997409236::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:44779427427730
    generally speaking tablespaces with different block sizes than the db standard are for transportable tablespaces only.
    however,
    Burleson will tell you to micromanage your memory allocations with multiple block sized tablespaces and various keep/recycle caches.
    http://www.dbazine.com/oracle/or-articles/burleson2
    I think its overkill and you can most likely get performance improvements from looking at other things such as the SQL your applications are running against the db. My rule of thumb is that 70% of your performance improvements are going to come from sql tuning. You can focus on the other 30% when the vast majority of your queries use 5 LIO per row per join. (Milsap's ratio not mine)

  • One Process Chain but different schedule.

    Hi Experts:
    I have this issue. I need to run one process chain in different schedule. For example:
    From days 28 to 5 of each month I need to run every hour.
    From days 6 to 27 of each month I need to run every four hour.
    I have BW 3.5
    Do you have any idea How I could do that?.
    Thanks in advanced.
    Message was edited by:
            Víctor Olivera

    Hi,
    maintain variant>change selections>after at operation mode if you further check the double arrow button it will leads you to workday/time screen
    check if it works for you coz' it has following option"Do not execute before"
    cheers,
    Swapna.G

  • Can Time Machine back up to 2 different discs? - i.e., make 2 back-ups?

    Can Time Machine back up to 2 different discs? - i.e., make 2 back-ups?
    The first back-up disc is a Time Capsule circa 2008 (refurbished in late 2010), the second is an external LaCie Rikiki 1TB circa 2013.
    My Macbook Pro is an early 2008 17" (hard drive replaced in 2011).
    I travel and am often away for long periods (~10 weeks). At home, I use the Time Capsule, but away I wish to use the LaCie Rikiki.
    In the past I took chances and didn't back-up while away. I was lucky. When I returned

    Have a look here  >  http://pondini.org/TM/34.html
    From Pondini’s excellent Information Here...
    Frequently Asked Questions

  • Oracle Scheduler: create different schedule time per day

    Hi,
    Is it possible to create different schedule times based on the day?
    Example I've schedule a backup-job to run every day @ 23h
    So i configured my job as :
       execute dbms_scheduler.set_attribute(name=>'DAILY_BACKUP_JOB',attribute=>'repeat_interval',value=>'FREQ=DAILY;BYHOUR=23;BYMINUTE=00');
    But now I want to fine tune this and I like to start the job every sunday @ 21h.
    is this possible to configure this is the same job? Or do I have to create 2 separate jobs for it? One for MON - SAT @ 23h and another for SUN @ 21h?
    Kind regards,

    Hi,
    You can create 2 schedules and assign them to your job:
    BEGIN  
    -- week days  
    dbms_scheduler.create_schedule('week_days_sched', repeat_interval => 'FREQ=DAILY;BYDAY=MON,TUE,WED,THU,FRI,SAT;BYHOUR=23');  
    -- sunday   
    dbms_scheduler.create_schedule('sunday_sched', repeat_interval => 'FREQ=DAILY;BYDAY=SUN;BYHOUR=21');  
    END;  
    Now specify these 2 schedules for your job:
    BEGIN  
    dbms_scheduler.set_attribute( name => 'YOUR_JOB', attribute => 'repeat_interval', value => 'week_days_sched,sunday_sched');
    END;

  • Possible to back up volumes to different hard drives.

    I have multiple hard drives attached to my Mac Pro and all 4 internal slots are full. I would like Time Machine to copy different volumes to two different external hard drives. I can't buy a single hard drive big enough to handle backups of everything. It seems to me that Time Machine only lets you back up to one drive. In which case, it can't back everything up. Is this true?

    Depending on which drive you select as the backup in System Preferences/Time Machine will copy to that disk. But you can't run copies to 2 different volumes simultaneously.
    -mj

  • Backing up iPhone to different computer

    Right now, I backup my iPhone and my wife's iPhone to her Lenovo netbook.
    We don't have any music, videos, etc. purchased through iTunes.
    The only thing we have is about 10 ringtones that I made.
    Is it possible to start backing up our iPhones to a different computer without any repercussions?
    Abviously I will need to transfer the ringtones I made to the new computer, but other than that, is there anything that wouldn't allow something like this to be done?
    Is there anything that needs to be done as far as "disassociating" the iPhone's from the old computer?

    anyone?

  • Back up touch to different computer?

    My neighbor kid broke the screen on his iPod touch. The windows laptop he has the touch sync'd with is not available for a couple weeks.
    Is there any way to back up his touch to one of my macs so we can send this touch in for replacement (he has 3rd party coverage)?

    Yes.  Connect the iPod Touch to your Mac. When it appears under the devices section in the left hand pane of iTunes, right->click on it and choose Backup.  Keep in mind that the backup does not actually include the backing up of music, movies, apps, and such.  See this article for what IS contained in a backup.
    http://support.apple.com/kb/ht1766
    For everything else, such as the movies and music, you'll need the help of some third party software.  See this this older post from another forum member Zevoneer covering different possibilities.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • Create a single delivery for different schedule lines in the scheduling agr

    Hi
    I want to create a single delivery for different line items with different delivery dates in the scheduling agreement,  as Iam aware it is possible to combine different line items into one delivery through sales order.
    Need your inputs
    Aravind

    Hi,
    Try with below solution and see I am not confirm about this
    VL01N >>> Menu outbound delivery >>> Deliver sales order
    Here you put order number and selected date as your ANOTHER SCHEDULE LINE
    Kapil

  • Restoring backed-up files to different TX-2000

    I purchased a new Vista TX-2000 in 2008, which is now having motherboard problems.  It is backed-up with the "Backup and Restore Center" that came with Vista.  I depend daily on the unit for my business and have been told by HP Help that I may loose the hard drive files when the MB is replaced.  To cover the possibility, I have purchased a used TX-2000 from E-Bay.  It is in good shape and appears to be vintage 2007, with a smaller size hard drive (120MB vs. 250MB).  The failing unit has two partitions, created originally by HP.  The E-Bay machine was third-party re-formatted with a single partition, with no Recovery files, nor included the original Restore CDs.  Both machines have Vista, SP2.
    Other details:  HP Help says there are no Recovery CDs available for the E-Bay machine.  There is adequate room on the E-bay machine for restoration of the files.
    Questions:
    1)  Can I restore my backup from the failing machine to  the E-Bay machine?
    2)  Do I need the drives on both machines to be identical,both size and partitioning?
    3)  Can I just physically transfer the drive from the failing machine to the E-bay machine or is there an embedded number that has to match the drive boot record (or whatever it's called nowadays)?  Can I harm the drive by trying or will Vista mark the drive in some way to make it unusable with the original machine?
    Just for completeness, I have spoken to HP Help about this a half-dozen times and got a different answer each time.  They appear now to be no more than a message center and their "experts" just read off their monitors whatever a database search says.  Definitely HP Help is no longer technically knowledgeable.

    I believe that Apple's "Backup" application uses a special storage scheme that normaly requires Apple Backup to restore the backup items. There may be a problem, though, because your screenshot shows the backup items as ordinary folders. I don't use Backup any more, but I have some old storage items made with Backup 3, and my full and incremental backup items look like single files in Finder. They actually are packages, "special" folders with the same internal structure as the one you posted, but which look like single files in Finder. Maybe you used an earlier version of Backup that creates folders instead of package files.
    I don't know if Backup 3 will be able to open and use the "normal-looking" folders that you do have, but it's worth a try. If you don't have Backup 3 on your current Leopard installation, you can download it at
    http://support.apple.com/kb/DL184
    You need a MobileMe subscription to make new backups, but I think you can restore old backups even without a subscription. There is a Help menu in Backup 3 which includes instructions on how to restore things when you no longer have the backup plan used to make the backups. You would normally use Backup 3 to open the most recent IncrementalBackup file if there is one, otherwise the FullBackup file. In your situation I would try to open the folder with those names, not the folder contents.
    If this doesn't work try double-clicking the "backup.sparseimage" files in the Folder>Contents>Contents subfolders. If the disk image mounts, look inside the mounted disk for your stuff and drag the contents back to your internal HD. Don't try to restore "settings", just datafiles.

  • Project Server 2010 - Different Schedule Dates for Different Users -- Same File

    We have an issue regarding users viewing the same schedule, different machines.
    The PMs have a schedule that was built in 2007 by the offshore team.  We are running Project Server 2010 corporate, and they the PMs here on site have Project Professional 2010.  Within the last couple of weeks, the PMs have noticed changes in
    the dates.
    When I open the schedule, I see the expected dates rendered in both PWA and Project Professional.  Both draft and published versions are the same regardless of where the schedule is opened for editing.  There are two PMs managing the schedules. 
    One sees what I see--the expected dates.  The other sees differences in dates--months, in fact.  Scheduled end date is 10/22/2013.   When the second PM opens the schedule, he sees a scheduled end date of 2/17/2014.
    I advised them that the offshore team needed to upgrade to 2010 due to the differences between 2007 and 2010.  Additionally, and I could be wrong, having the server run in compability mode for so long (the upgrade was done in May 2013), is not ideal. 
    (Offshore team has since updated to 2010.)
    Any thoughts on what could be causing this issue?  Corrupt version of Professional?  Settings askew?
    Thank you,
    L.D.

    My bad, I didn't know that you were not using Project Server.
    Then the file might be corrupted.
    Try the
    XML export and the
    save for sharing method to repair it.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Back ground job - report, is scheduled 49 hrs ago, still ACTIVE??

    Hi Experts,
    Pls. clarify one of my simple doubt that, Weather a report(which has only one SELECT statement, with key in WHERE clause) wuld take 49 hours to execute? bcoz, I scheduled a back ground job for my_report, 49 hours ago, its still ACTIVE, OR does it went to infinitive loop?
    thanq

    Hi
    no one select query won't take that mucj of time
    may be that program went in infinite loop
    please check with that
    reward if useful
    <b>below is the best way to write a select query</b>
    Ways of Performance Tuning
    1.     Selection Criteria
    2.     Select Statements
    •     Select Queries
    •     SQL Interface
    •     Aggregate Functions
    •     For all Entries
    Select Over more than one Internal table
    Selection Criteria
    1.     Restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code using CHECK statement. 
    2.     Select with selection list.
    Points # 1/2
    SELECT * FROM SBOOK INTO SBOOK_WA.
      CHECK: SBOOK_WA-CARRID = 'LH' AND
             SBOOK_WA-CONNID = '0400'.
    ENDSELECT.
    The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list
    SELECT  CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
      WHERE SBOOK_WA-CARRID = 'LH' AND
                  SBOOK_WA-CONNID = '0400'.
    Select Statements   Select Queries
    1.     Avoid nested selects
    2.     Select all the records in a single shot using into table clause of select statement rather than to use Append statements.
    3.     When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary index.
    4.     For testing existence , use Select.. Up to 1 rows statement instead of a Select-Endselect-loop with an Exit. 
    5.     Use Select Single if all primary key fields are supplied in the Where condition .
    Point # 1
    SELECT * FROM EKKO INTO EKKO_WA.
      SELECT * FROM EKAN INTO EKAN_WA
          WHERE EBELN = EKKO_WA-EBELN.
      ENDSELECT.
    ENDSELECT.
    The above code can be much more optimized by the code written below.
    SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
        FROM EKKO AS P INNER JOIN EKAN AS F
          ON PEBELN = FEBELN.
    Note: A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. One should therefore use nested SELECT loops  only if the selection in the outer loop contains very few lines or the outer loop is a SELECT SINGLE statement.
    Point # 2
    SELECT * FROM SBOOK INTO SBOOK_WA.
      CHECK: SBOOK_WA-CARRID = 'LH' AND
             SBOOK_WA-CONNID = '0400'.
    ENDSELECT.
    The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list and puts the data in one shot using into table
    SELECT  CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
      WHERE SBOOK_WA-CARRID = 'LH' AND
                  SBOOK_WA-CONNID = '0400'.
    Point # 3
    To choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields . In certain scenarios, it is advisable to check whether a new index can speed up the performance of a program. This will come handy in programs that access data from the finance tables.
    Point # 4
    SELECT * FROM SBOOK INTO SBOOK_WA
      UP TO 1 ROWS
      WHERE CARRID = 'LH'.
    ENDSELECT.
    The above code is more optimized as compared to the code mentioned below for testing existence of a record.
    SELECT * FROM SBOOK INTO SBOOK_WA
        WHERE CARRID = 'LH'.
      EXIT.
    ENDSELECT.
    Point # 5
    If all primary key fields are supplied in the Where condition you can even use Select Single.
    Select Single requires one communication with the database system, whereas Select-Endselect needs two.
    Select Statements           contd..  SQL Interface
    1.     Use column updates instead of single-row updates
    to update your database tables.
    2.     For all frequently used Select statements, try to use an index.
    3.     Using buffered tables improves the performance considerably.
    Point # 1
    SELECT * FROM SFLIGHT INTO SFLIGHT_WA.
      SFLIGHT_WA-SEATSOCC =
        SFLIGHT_WA-SEATSOCC - 1.
      UPDATE SFLIGHT FROM SFLIGHT_WA.
    ENDSELECT.
    The above mentioned code can be more optimized by using the following code
    UPDATE SFLIGHT
           SET SEATSOCC = SEATSOCC - 1.
    Point # 2
    SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
      WHERE CARRID = 'LH'
        AND CONNID = '0400'.
    ENDSELECT.
    The above mentioned code can be more optimized by using the following code
    SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
      WHERE MANDT IN ( SELECT MANDT FROM T000 )
        AND CARRID = 'LH'
        AND CONNID = '0400'.
    ENDSELECT.
    Point # 3
    Bypassing the buffer increases the network considerably
    SELECT SINGLE * FROM T100 INTO T100_WA
      BYPASSING BUFFER
      WHERE     SPRSL = 'D'
            AND ARBGB = '00'
            AND MSGNR = '999'.
    The above mentioned code can be more optimized by using the following code
    SELECT SINGLE * FROM T100  INTO T100_WA
      WHERE     SPRSL = 'D'
            AND ARBGB = '00'
            AND MSGNR = '999'.
    Select Statements       contd…           Aggregate Functions
    •     If you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates yourself.
    Some of the Aggregate functions allowed in SAP are  MAX, MIN, AVG, SUM, COUNT, COUNT( * )
    Consider the following extract.
                Maxno = 0.
                Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
                 Check zflight-fligh > maxno.
                 Maxno = zflight-fligh.
                Endselect.
    The  above mentioned code can be much more optimized by using the following code.
    Select max( fligh ) from zflight into maxno where airln = ‘LF’ and cntry = ‘IN’.
    Select Statements    contd…For All Entries
    •     The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.
         The plus
    •     Large amount of data
    •     Mixing processing and reading of data
    •     Fast internal reprocessing of data
    •     Fast
         The Minus
    •     Difficult to program/understand
    •     Memory could be critical (use FREE or PACKAGE size)
    Points to be must considered FOR ALL ENTRIES
    •     Check that data is present in the driver table
    •     Sorting the driver table
    •     Removing duplicates from the driver table
    Consider the following piece of extract
    Loop at int_cntry.
           Select single * from zfligh into int_fligh
    where cntry = int_cntry-cntry.
    Append int_fligh.
    Endloop.
    The above mentioned can be more optimized by using the following code.
    Sort int_cntry by cntry.
    Delete adjacent duplicates from int_cntry.
    If NOT int_cntry[] is INITIAL.
                Select * from zfligh appending table int_fligh
                For all entries in int_cntry
                Where cntry = int_cntry-cntry.
    Endif.
    Select Statements    contd…  Select Over more than one Internal table
    1.     Its better to use a views instead of nested Select statements.
    2.     To read data from several logically connected tables use a join instead of nested Select statements. Joins are preferred only if all the primary key are available in WHERE clause for the tables that are joined. If the primary keys are not provided in join the Joining of tables itself takes time.
    3.     Instead of using nested Select loops it is often better to use subqueries.
    Point # 1
    SELECT * FROM DD01L INTO DD01L_WA
      WHERE DOMNAME LIKE 'CHAR%'
            AND AS4LOCAL = 'A'.
      SELECT SINGLE * FROM DD01T INTO DD01T_WA
        WHERE   DOMNAME    = DD01L_WA-DOMNAME
            AND AS4LOCAL   = 'A'
            AND AS4VERS    = DD01L_WA-AS4VERS
            AND DDLANGUAGE = SY-LANGU.
    ENDSELECT.
    The above code can be more optimized by extracting all the data from view DD01V_WA
    SELECT * FROM DD01V INTO  DD01V_WA
      WHERE DOMNAME LIKE 'CHAR%'
            AND DDLANGUAGE = SY-LANGU.
    ENDSELECT
    Point # 2
    SELECT * FROM EKKO INTO EKKO_WA.
      SELECT * FROM EKAN INTO EKAN_WA
          WHERE EBELN = EKKO_WA-EBELN.
      ENDSELECT.
    ENDSELECT.
    The above code can be much more optimized by the code written below.
    SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
        FROM EKKO AS P INNER JOIN EKAN AS F
          ON PEBELN = FEBELN.
    Point # 3
    SELECT * FROM SPFLI
      INTO TABLE T_SPFLI
      WHERE CITYFROM = 'FRANKFURT'
        AND CITYTO = 'NEW YORK'.
    SELECT * FROM SFLIGHT AS F
        INTO SFLIGHT_WA
        FOR ALL ENTRIES IN T_SPFLI
        WHERE SEATSOCC < F~SEATSMAX
          AND CARRID = T_SPFLI-CARRID
          AND CONNID = T_SPFLI-CONNID
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    The above mentioned code can be even more optimized by using subqueries instead of for all entries.
    SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
        WHERE SEATSOCC < F~SEATSMAX
          AND EXISTS ( SELECT * FROM SPFLI
                         WHERE CARRID = F~CARRID
                           AND CONNID = F~CONNID
                           AND CITYFROM = 'FRANKFURT'
                           AND CITYTO = 'NEW YORK' )
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    1.     Table operations should be done using explicit work areas rather than via header lines.
    2.     Always try to use binary search instead of linear search. But don’t forget to sort your internal table before that.
    3.     A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
    4.     A binary search using secondary index takes considerably less time.
    5.     LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
    6.     Modifying selected components using “ MODIFY itab …TRANSPORTING f1 f2.. “ accelerates the task of updating  a line of an internal table.
    Point # 2
    READ TABLE ITAB INTO WA WITH KEY K = 'X‘ BINARY SEARCH.
    IS MUCH FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY K = 'X'.
    If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
    Point # 3
    READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
    Point # 5
    LOOP AT ITAB INTO WA WHERE K = 'X'.
    ENDLOOP.
    The above code is much faster than using
    LOOP AT ITAB INTO WA.
      CHECK WA-K = 'X'.
    ENDLOOP.
    Point # 6
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
    The above code is more optimized as compared to
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1.
    7.     Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
    8.    If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
    9.    "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to “ LOOP-APPEND-ENDLOOP.”
    10.   “DELETE ADJACENT DUPLICATES“ accelerates the task of deleting duplicate entries considerably as compared to “ READ-LOOP-DELETE-ENDLOOP”.
    11.   "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to “  DO -DELETE-ENDDO”.
    Point # 7
    Modifying selected components only makes the program faster as compared to Modifying all lines completely.
    e.g,
    LOOP AT ITAB ASSIGNING <WA>.
      I = SY-TABIX MOD 2.
      IF I = 0.
        <WA>-FLAG = 'X'.
      ENDIF.
    ENDLOOP.
    The above code works faster as compared to
    LOOP AT ITAB INTO WA.
      I = SY-TABIX MOD 2.
      IF I = 0.
        WA-FLAG = 'X'.
        MODIFY ITAB FROM WA.
      ENDIF.
    ENDLOOP.
    Point # 8
    LOOP AT ITAB1 INTO WA1.
      READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
      IF SY-SUBRC = 0.
        ADD: WA1-VAL1 TO WA2-VAL1,
             WA1-VAL2 TO WA2-VAL2.
        MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
      ELSE.
        INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
      ENDIF.
    ENDLOOP.
    The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
    LOOP AT ITAB1 INTO WA.
      COLLECT WA INTO ITAB2.
    ENDLOOP.
    SORT ITAB2 BY K.
    COLLECT, however, uses a hash algorithm and is therefore independent
    of the number of entries (i.e. O(1)) .
    Point # 9
    APPEND LINES OF ITAB1 TO ITAB2.
    This is more optimized as compared to
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    Point # 10
    DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
    This is much more optimized as compared to
    READ TABLE ITAB INDEX 1 INTO PREV_LINE.
    LOOP AT ITAB FROM 2 INTO WA.
      IF WA = PREV_LINE.
        DELETE ITAB.
      ELSE.
        PREV_LINE = WA.
      ENDIF.
    ENDLOOP.
    Point # 11
    DELETE ITAB FROM 450 TO 550.
    This is much more optimized as compared to
    DO 101 TIMES.
      DELETE ITAB INDEX 450.
    ENDDO.
    12.   Copying internal tables by using “ITAB2[ ] = ITAB1[ ]” as compared to “LOOP-APPEND-ENDLOOP”.
    13.   Specify the sort key as restrictively as possible to run the program faster.
    Point # 12
    ITAB2[] = ITAB1[].
    This is much more optimized as compared to
    REFRESH ITAB2.
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    Point # 13
    “SORT ITAB BY K.” makes the program runs faster as compared to “SORT ITAB.”
    Internal Tables         contd…
    Hashed and Sorted tables
    1.     For single read access hashed tables are more optimized as compared to sorted tables.
    2.      For partial sequential access sorted tables are more optimized as compared to hashed tables
    Hashed And Sorted Tables
    Point # 1
    Consider the following example where HTAB is a hashed table and STAB is a sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    This runs faster for single read access as compared to the following same code for sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE STAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    Point # 2
    Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
    LOOP AT STAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.
    This runs faster as compared to
    LOOP AT HTAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.

Maybe you are looking for

  • Firefox hangs when going on any search engine (Google, Bing &c.)

    Whenever I go on Google, Bing or any other big search engine, Firefox beta 4.11 freezes.

  • Tablespaces used in user schema

    guys, I want to find all tablespaces used in user schema - scott. I tried using views like v$tablespace, v$datafile.. but doesnt seem to help. any suggestions/inputs ?? Thanks

  • Folder Size in Explorer, Windows 7

    Dear Readers: I would like to know if Windows 7 includes the option to view Folder Size in the Explorer window interface (an option similar to viewing [file] Size)?  I have attempted to use various software to do this in Windows Vista such as Tree Si

  • Is My Home Hub Outputting Too Much Power?

    My Home Hub 2 is currently outputting 7.9 dBm down and 1.6 dBm up. Is that too high? Is there anything I can do to reduce it? If my answer was helpful, please give me a star by clicking the star on the left hand side. Thank you.

  • Does it fit Panther into Mac G5 Quad?

    Hello there. I run a middlevel studio in NY and I like to improve my sound and performance with a power G5. I'll appreciate if somebody tell me.."Can I run Panther 10.3 OS X in Mac G5 Quad?" I'm intrested in that machine because I run very power soft