Long time for execution for scheduled CIF background jobs

Hi,
we hv schedlued CIF background job to be run daily around 10.30 PST.
there is large variation for the time required for execution of this job.
on 26 Dec, it took approx 48000 seconds while regular average is 120 seconds only.
today, despite past of 6000 seconds, the job is still in ACTIVE stage.
can anyone know why such long delay for such jobs?
how can i reduce its execution time (as one of case in a week)?
rgds/Jay

Hi Jay,
A few obvious things to look for:
1.  Multiple CIF activation jobs running at the same time
2.  Large change in the master data, eg new plant, new Material Masters, new customers, etc etc.
3.  Conflicts with other non CIF programs that may be going after the same data
4.  Communication degradation between the OLTP and SCM clients
Normally you refer such questions to someone on your Basis team, or perhaps your DBA.  They can turn on tracing tools that can track the changes in your environment that may be contributing to the changes in run time.
Regards,
DB49

Similar Messages

  • BAPI for Scheduling a background job

    Hi all,
    is there any bapi for scheduling a background job?
    i mean can we do background job using bapi
    If not how can we create a bapi for scheduling a background job.
    Thanks & Regards,
    Azhar

    Hi,
    Use following BAPIs for scheduling a job in background
    BAPI_XBP_JOB_OPEN - This BAPI solves the first step in scheduling a job in the R/3 background processing system. You can create the job with this method.
    Using additional BAPI calls BAPI_XBP_JOB_ADD_ABAP_STEP and BAPI_XBP_JOB_ADD_EXT_STEP, you can add job steps to the job.
    With the BAPI call BAPI_XBP_JOB_CLOSE, you can finish defining the job and transfer it to the background processing system with the status Scheduled without start date.
    You have execute the job with the BAPI calls BAPI_XBP_JOB_START_IMMEDIATELY or BAPI_XBP_JOB_START_ASAP.
    I hope it would help you.
    Regards,
    Venkatram

  • Custom Attributes for Scheduled Transactions (Background Jobs)

    Hi,
    I am trying to fetch the custom attributes for scheduled background jobs. Since we are not using the XAcute Queries to run the automatic jobs, we can't use the AUTOBIND property for custom attributes and hence can't fetch them in the scheduled transactions. Is there any way to retrieve the attributes while scheduling a transaction ?
    Thanks,
    Amit Rath

    Hi Amit,
    a way that works: inside your transaction you can call a XML query that reads out the property list for a given user. In the URL of the XML query you can add the user by using the IllumLoginName parameter.
    - create a XML query with the following URL:
    http://<server>:<port>/XMII/PropertyAccessServlet?mode=list&Content-Type=text/xml&IllumLoginName=<User>&IllumLoginPassword=<Password>
    - in your transaction, call the query. You can retrieve the value of the attribute with a XPath expression like this:
    XML_propertyAccessServlet_0.Results{/Rowsets/Rowset/Row[Name='MyAttribute']/Value}
    Interestingly, adding a User / Password in the Scheduler Editor of the job does not work (MII 12.0.2). Maybe this would be also an option for you to try.
    Michael
    Edited by: Michael Otto on Nov 9, 2010 8:27 AM

  • We are running a report ? it is  taking long time for  execution. what step

    we are running a report ? it is  taking long time for  execution. what steps will we do to reduce the execution time?

    Hi ,
    the performance can be improved thru many ways..
    First try to select based on the key fields if it is a very large table.
    if not then create a Secondary index for selection.
    dont perform selects inside a loop , instead do FOR ALL ENTRIES IN
    try to perform may operations in one loop rather than calling different loops on the same internal table..
    All these above and many more steps can be implemented to improve the performance.
    Need to look into your code, how it can be improved in your case...
    Regards,
    Vivek Shah

  • Validate/madatory  in order to avoid  long time for the program execution.

    Below is my selction screen.  I would like to do validations for specific fields to make them mandatory fields   as well.
    Could you please suggeste me what are the fields that I can validate/madatory  in order to avoid  long time  for the program  run.
    *Program selections
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-h01.
    SELECT-OPTIONS : o_as4loc   FOR v_as4local,
                     o_ddlang   FOR ddlanguage,
                     o_vkorg    FOR vkorg     MEMORY ID vko,
                     o_auart    FOR auart              MEMORY     ID aat,
                     o_fdnam    FOR fdnam,
                     o_spart    FOR spart   MEMORY ID spa,
                     o_vbeln    FOR vbeln            MEMORY ID aun,
                     o_posnr    FOR posnr,
                     o_matnr    FOR matnr            MEMORY ID mat,
                     o_pltyp    FOR pltyp            MEMORY ID vpl,
                     o_j_3ar    FOR j_3arqda,
                     o_kzr00    FOR kbetr,                       " -ZR00
                     o_kalsm    FOR kalsmasd,
                     o_kmwst    FOR kbetr,                       " -MWST
                     o_kbmen    FOR kbmeng,
                     o_land1    FOR land1            MEMORY ID LND
    SELECTION-SCREEN  : END OF BLOCK b1.
    Thanks in advance.

    Hi,
    Make key fields as well as fields on which there in an index in the database table mandatory.
    Regards,
    Abhijit G. Borkar

  • Longer time for Material Availability check while creation of prd order.

    Hi guys,
    I am facing a weird problem while creating production orders thru CO01.
    I enter the component and plant and I am also using the forward scheduling option.
    for some reason, SAP is taking a long time for material availability check when I hit the release button.
    Sometimes its taking more than an hour. Its happening with few specific BOM's, and I have checked the master data but I could hardly find a problem in master data.
    Can someone suggest me some tips ??
    Thanks & Regards,
    Sashivardhan

    Hi,
    Please check the Availability check control maintained for Components it should be 01 or 02. Also check the issue storage location maintained or not. You can maintain issue storage location in BOM in Status/lng text tab in Production Storage Location.
    Hope this will help.
    Regards,
    Navin

  • Long time for activation

    Hi ,
    May I know the reason for
    1) whenever I activate Data source object or infocubes, it is taking very long time.
    2) even for deletion of DTP or deleting Data source object, its very very slow..
    Generally it was not taking so much time in 3.x (not even 1/4 th of this)..
    Thanks in advance
    Anan

    After some time it is throwing dump with the following message..
    How to correct the error                                                                        
        Programs with long runtime should generally be started as background                        
        jobs. If this is not possible, you can increase the system profile                          
        parameter "rdisp/max_wprun_time".                                                                               
    Depending on the cause of the error, you may have to take one of the                        
        following measures:                                                                         
        - Endless loop: Correct program;                                                            
        - Dataset resulting from database access is too large:                                      
          Instead of "SELECT * ... ENDSELECT", use "SELECT * INTO internal table                    
          (for example);                                                                               
    - Database has unsuitable index: Check index generation.                                                                               
    If the error occures in a non-modified SAP program, you may be able to                      
        find an interim solution in an SAP Note.                                                    
        If you have access to SAP Notes, carry out a search with the following                      
        keywords:                                                                               
    "TIME_OUT" " "                                                                               
    "RADBTDLT" or "RADBTDL0"                                                                    
        "TTYP_DEL"                                                                               
    If you cannot solve the problem yourself and want to send an error                          
        notification to SAP, include the following information:                                                                               
    1. The description of the current problem (short dump)                                                                               
    To save the description, choose "System->List->Save->Local File            
       (Unconverted)".                                                                               
    2. Corresponding system log                                                                               
    Display the system log by calling transaction SM21.                        
          Restrict the time interval to 10 minutes before and five minutes           
       after the short dump. Then choose "System->List->Save->Local File             
       (Unconverted)".                                                                               
    3. If the problem occurs in a problem of your own or a modified SAP           
       program: The source code of the program                                       
          In the editor, choose "Utilities->More                                     
       Utilities->Upload/Download->Download".                                                                               
    4. Details about the conditions under which the error occurred or which       
       actions and input led to the error.                                                                               
    THanks
    Anan

  • Take long time for loading

    Hi Experts,
    One of my data target (Data comming from another ODS) is taking long time for loading, basically it takes below 10 times only, but today it is running from last 40 minesu2026
    In Status Tab it showing....
    Job termination in source system
    Diagnosis
    The background job for data selection in the source system has been terminated. It is very likely that a short dump has been logged in the source system
    Procedure
    Read the job log in the source system. Additional information is displayed here.
    To access the job log, use the monitor wizard (step-by-step analysis)  or the menu path <LS>Environment -> Job Overview -> In Source System
    Error correction:
    Follow the instructions in the job log messages.
    Can anyone please solve my problem.
    Thanks in advance
    David

    Hi Experts,
    Thanks for your answers, and my load failed when the data comes from one ODS to another ODS. find the below job log
    Job started
    Step 001 started (program SBIE0001, variant &0000000007169, user ID RCREMOTE)
    Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    DATASOURCE = 8ZPP_OP3
             Current Values for Selected Profile Parameters               *
    abap/heap_area_nondia......... 20006838008                             *
    abap/heap_area_total.......... 20006838008                             *
    abap/heaplimit................ 83886080                                *
    zcsa/installed_languages...... ED                                      *
    zcsa/system_language.......... E                                       *
    ztta/max_memreq_MB............ 2047                                    *
    ztta/roll_area................ 5000000                                 *
    ztta/roll_extension........... 4294967295                              *
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 1 in task 0002 (1 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:31:55, End = 06.09.2010 01:31:55
    Asynchronous transmission of info IDoc 3 in task 0003 (1 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 2 in task 0004 (2 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:00, End = 06.09.2010 01:32:00
    Asynchronous transmission of info IDoc 4 in task 0005 (2 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 3 in task 0006 (3 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:04, End = 06.09.2010 01:32:04
    Asynchronous transmission of info IDoc 5 in task 0007 (3 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 4 in task 0008 (4 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:08, End = 06.09.2010 01:32:08
    Asynchronous transmission of info IDoc 6 in task 0009 (4 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 5 in task 0010 (5 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:11, End = 06.09.2010 01:32:11
    Asynchronous transmission of info IDoc 7 in task 0011 (5 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Asynchronous send of data package 13 in task 0026 (6 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:01, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:44, End = 06.09.2010 01:32:45
    tRFC: Data Package = 8, TID = 0AEB465C00AE4C847CEA0070, Duration = 00:00:17,
    tRFC: Start = 06.09.2010 01:32:29, End = 06.09.2010 01:32:46
    Asynchronous transmission of info IDoc 15 in task 0027 (5 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 14 in task 0028 (6 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:48, End = 06.09.2010 01:32:48
    tRFC: Data Package = 9, TID = 0AEB465C00AE4C847CEF0071, Duration = 00:00:18,
    tRFC: Start = 06.09.2010 01:32:33, End = 06.09.2010 01:32:51
    Asynchronous transmission of info IDoc 16 in task 0029 (5 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 15 in task 0030 (6 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:52, End = 06.09.2010 01:32:52
    Asynchronous transmission of info IDoc 17 in task 0031 (6 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 16 in task 0032 (7 parallel tasks)
    tRFC: Data Package = 10, TID = 0AEB465C00684C847CF30070, Duration = 00:00:18,
    tRFC: Start = 06.09.2010 01:32:37, End = 06.09.2010 01:32:55
    tRFC: Data Package = 11, TID = 0AEB465C02E14C847CF70083, Duration = 00:00:17,
    tRFC: Start = 06.09.2010 01:32:42, End = 06.09.2010 01:32:59
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:32:56, End = 06.09.2010 01:32:56
    Asynchronous transmission of info IDoc 18 in task 0033 (5 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 17 in task 0034 (6 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:33:00, End = 06.09.2010 01:33:00
    tRFC: Data Package = 12, TID = 0AEB465C00AE4C847CFB0072, Duration = 00:00:16,
    tRFC: Start = 06.09.2010 01:32:46, End = 06.09.2010 01:33:02
    Asynchronous transmission of info IDoc 19 in task 0035 (5 parallel tasks)
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 100,000 records
    Result of customer enhancement: 100,000 records
    Asynchronous send of data package 18 in task 0036 (6 parallel tasks)
    tRFC: Data Package = 0, TID = , Duration = 00:00:00, ARFCSTATE =
    tRFC: Start = 06.09.2010 01:33:04, End = 06.09.2010 01:33:04
    Asynchronous transmission of info IDoc 20 in task 0037 (6 parallel tasks)
    ABAP/4 processor: DBIF_RSQL_SQL_ERROR
    Job cancelled
    Thanks
    Daivd
    Edited by: david Rathod on Sep 6, 2010 12:04 PM

  • Scheduling a Background Job for PM/CO Settlements (KO8G)

    Hi All,
    I've created variants for settlements of PM & CO orders using transaction KO8G. Now I want to schedule a background job using TCode SM36. What program name/ABAP name should I use for settlements when scheduling background jobs?
    Regards,
    Tso

    Hello Tso,
    Try transaction SCMO which provides you the option to set
    the start date to finish date and can also set the start time and
    finish time and allows you to specify the variant to be used.
    When in transaction KO8G fill out the fields as you wish them for
    the background job and then same the selection as a variant. There is
    an option to have the variant for background jobs and save the variant
    then you can specify this variant in the SCMO screen.
    SCMO is the sceduele manager which will allow you to scehedule many
    jobs as necessary.
    Some notes:
      332149  SCMA: Required workflow settings
      325118  Schedule Manager: link customer-specific reports
      317601  Schedule Manager: Customer reports for multilevel worklist
      332149  SCMA: Required workflow settings
      891042  SCHEDMAN: Automatic start of several flow definitions
    I hope this helps.
    Regards,
    Lucas

  • You are running a report. It is taking long time for

    You are running a report. It is taking long time for
    execution. What steps will you do to reduce the
    execution time.
        plx explain clearly

    Avoid loops inside loops.
    Avoid select inside loops.
    Select only the data that is required instead of using select *
    Select the field in the sequence as they are present in the database, and also specify the fields in the where clause in the same sequence.
    When ur using for all entries in the select statement, check whether the internal table to which ur refering is not initial.
    Remove select... endselect instead use into table
    Avoid Select Single inside the loop, instead select all the data before the loop and read that internal table inside the loop using binary search.
    Sort the Internal tables where ever necessary.

  • Taking too long time for booting

    Hi there,
    I just bought myself an iphone 5s. . Try to get up started for the 1st time but the thing keep booting or loading too long time for endless hours. What may go wrong? Appreciate if you could help me on this.

    But payment run before due date. you are not run before due date once check it

  • Schedule a background job for a program using ABAP code.

    Hi,
    I have to write a program to schedule a background job for another program.
    Need your help to understand how we can achieve this functionality.Any example of an abap code would be of great help.
    Need it urgently.
    Thanks in advance.
    Sandeep.

    Hi Sandeep,
    Here is the demo program regarding the BDC For the background job.
    report zprprbdc1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    ***data: begin of itab occurs 0 ,
    ***       matnr(20) type c,
    ***       mbrsh(30) type c,
    ***       mtart(30) type c,
    ***       kzsel(20) type c,
    ***       maktx(40) type c,
    ***       meins(5) type c,
    ***       end of itab.
    data: begin of record occurs 0,
    * data element: MATNR
            matnr_001(018),
    * data element: MBRSH
            mbrsh_002(001),
    * data element: MTART
            mtart_003(004),
    * data element: XFELD
            kzsel_01_004(001),
    * data element: MAKTX
            maktx_005(040),
    * data element: MEINS
            meins_006(003),
    * data element: MTPOS_MARA
            mtpos_mara_007(004),
          end of record.
    *** End generated data section ***
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    **do.
    **read dataset dataset into record.
    **if sy-subrc <> 0. exit. endif.
    call function 'GUI_UPLOAD'
      exporting
        filename                      = 'c:\jitu\bdc\10002.txt'
       filetype                      = 'ASC'
       has_field_separator           = 'x'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      tables
        data_tab                      = record
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    loop at record .
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-matnr_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-mbrsh_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-mtart_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-kzsel_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-mtpos_mara_007.
    perform bdc_transaction using 'MM01'.
    **enddo.
    endloop.
    perform close_group.
    *perform close_dataset using dataset.
    &*****************Reward point if helpful************&

  • Takes a long time for Apple logo to show up on boot up

    My 13" mpb early 2011 takes a long time for the Apple logo to show up... Is there a way to fix this? (It should show up within 2 seconds after the initial chime)
    I have Win7 installed, could it be that? Since it might be detecting which partition to boot up with.

    Check login items ...
    Remove all items from System Preferences > Users & Groups > Login Items
    Same for HD > Library > StartupItems
    Then restart your Mac to test.
    Not necessarily a Windows issue.
    ***   When you post for help, please state which OS X is installed.
    If you aren't sure, click About this Mac from your Apple menu 
    Troubleshooting advice can depend on that information.

  • Query taking long time for EXTRACTING the data more than 24 hours

    Hi ,
    Query taking long time for EXTRACTING the data more than 24 hours please find the query and explain plan details below even indexes avilable on table's goe's to FULL TABLE SCAN. please suggest me.......
    SQL> explain plan for select a.account_id,round(a.account_balance,2) account_balance,
    2 nvl(ah.invoice_id,ah.adjustment_id) transaction_id,
    to_char(ah.effective_start_date,'DD-MON-YYYY') transaction_date,
    to_char(nvl(i.payment_due_date,
    to_date('30-12-9999','dd-mm-yyyy')),'DD-MON-YYYY')
    due_date, ah.current_balance-ah.previous_balance amount,
    decode(ah.invoice_id,null,'A','I') transaction_type
    3 4 5 6 7 8 from account a,account_history ah,invoice i_+
    where a.account_id=ah.account_id
    and a.account_type_id=1000002
    and round(a.account_balance,2) > 0
    and (ah.invoice_id is not null or ah.adjustment_id is not null)
    and ah.CURRENT_BALANCE > ah.previous_balance
    and ah.invoice_id=i.invoice_id(+)
    AND a.account_balance > 0
    order by a.account_id,ah.effective_start_date desc; 9 10 11 12 13 14 15 16
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
    | 0 | SELECT STATEMENT | | 544K| 30M| | 693K (20)|
    | 1 | SORT ORDER BY | | 544K| 30M| 75M| 693K (20)|
    |* 2 | HASH JOIN | | 544K| 30M| | 689K (20)|
    |* 3 | TABLE ACCESS FULL | ACCOUNT | 20080 | 294K| | 6220 (18)|
    |* 4 | HASH JOIN OUTER | | 131M| 5532M| 5155M| 678K (20)|
    |* 5 | TABLE ACCESS FULL| ACCOUNT_HISTORY | 131M| 3646M| | 197K (25)|
    | 6 | TABLE ACCESS FULL| INVOICE | 262M| 3758M| | 306K (18)|
    Predicate Information (identified by operation id):
    2 - access("A"."ACCOUNT_ID"="AH"."ACCOUNT_ID")
    3 - filter("A"."ACCOUNT_TYPE_ID"=1000002 AND "A"."ACCOUNT_BALANCE">0 AND
    ROUND("A"."ACCOUNT_BALANCE",2)>0)
    4 - access("AH"."INVOICE_ID"="I"."INVOICE_ID"(+))
    5 - filter("AH"."CURRENT_BALANCE">"AH"."PREVIOUS_BALANCE" AND ("AH"."INVOICE_ID"
    IS NOT NULL OR "AH"."ADJUSTMENT_ID" IS NOT NULL))
    22 rows selected.
    Index Details:+_
    SQL> select INDEX_OWNER,INDEX_NAME,COLUMN_NAME,TABLE_NAME from dba_ind_columns where
    2 table_name in ('INVOICE','ACCOUNT','ACCOUNT_HISTORY') order by 4;
    INDEX_OWNER INDEX_NAME COLUMN_NAME TABLE_NAME
    OPS$SVM_SRV4 P_ACCOUNT ACCOUNT_ID ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT_NAME ACCOUNT_NAME ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT CUSTOMER_NODE_ID ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT ACCOUNT_TYPE_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_ACCOUNT_TYPE ACCOUNT_TYPE_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_INVOICE INVOICE_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_PREVIOUS_INVOICE PREVIOUS_INVOICE_ID ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT_NAME_ID ACCOUNT_NAME ACCOUNT
    OPS$SVM_SRV4 U_ACCOUNT_NAME_ID ACCOUNT_ID ACCOUNT
    OPS$SVM_SRV4 I_LAST_MODIFIED_ACCOUNT LAST_MODIFIED ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_INVOICE_ACCOUNT INVOICE_ACCOUNT_ID ACCOUNT
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ACCOUNT ACCOUNT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ACCOUNT SEQNR ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_INVOICE INVOICE_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ADINV INVOICE_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA CURRENT_BALANCE ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA INVOICE_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA ADJUSTMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_CIA ACCOUNT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_LMOD LAST_MODIFIED ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ADINV ADJUSTMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_PAYMENT PAYMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_ADJUSTMENT ADJUSTMENT_ID ACCOUNT_HISTORY
    OPS$SVM_SRV4 I_ACCOUNT_HISTORY_APPLIED_DT APPLIED_DATE ACCOUNT_HISTORY
    OPS$SVM_SRV4 P_INVOICE INVOICE_ID INVOICE
    OPS$SVM_SRV4 U_INVOICE CUSTOMER_INVOICE_STR INVOICE
    OPS$SVM_SRV4 I_LAST_MODIFIED_INVOICE LAST_MODIFIED INVOICE
    OPS$SVM_SRV4 U_INVOICE_ACCOUNT ACCOUNT_ID INVOICE
    OPS$SVM_SRV4 U_INVOICE_ACCOUNT BILL_RUN_ID INVOICE
    OPS$SVM_SRV4 I_INVOICE_BILL_RUN BILL_RUN_ID INVOICE
    OPS$SVM_SRV4 I_INVOICE_INVOICE_TYPE INVOICE_TYPE_ID INVOICE
    OPS$SVM_SRV4 I_INVOICE_CUSTOMER_NODE CUSTOMER_NODE_ID INVOICE
    32 rows selected.
    Regards,
    Bathula
    Oracle-DBA

    I have some suggestions. But first, you realize that you have some redundant indexes, right? You have an index on account(account_name) and also account(account_name, account_id), and also account_history(invoice_id) and account_history(invoice_id, adjustment_id). No matter, I will suggest some new composite indexes.
    Also, you do not need two lines for these conditions:
    and round(a.account_balance, 2) > 0
    AND a.account_balance > 0
    You can just use: and a.account_balance >= 0.005
    So the formatted query isselect a.account_id,
           round(a.account_balance, 2) account_balance,
           nvl(ah.invoice_id, ah.adjustment_id) transaction_id,
           to_char(ah.effective_start_date, 'DD-MON-YYYY') transaction_date,
           to_char(nvl(i.payment_due_date, to_date('30-12-9999', 'dd-mm-yyyy')),
                   'DD-MON-YYYY') due_date,
           ah.current_balance - ah.previous_balance amount,
           decode(ah.invoice_id, null, 'A', 'I') transaction_type
      from account a, account_history ah, invoice i
    where a.account_id = ah.account_id
       and a.account_type_id = 1000002
       and (ah.invoice_id is not null or ah.adjustment_id is not null)
       and ah.CURRENT_BALANCE > ah.previous_balance
       and ah.invoice_id = i.invoice_id(+)
       AND a.account_balance >= .005
    order by a.account_id, ah.effective_start_date desc;You will probably want to select:
    1. From ACCOUNT first (your smaller table), for which you supply a literal on account_type_id. That should limit the accounts retrieved from ACCOUNT_HISTORY
    2. From ACCOUNT_HISTORY. We want to limit the records as much as possible on this table because of the outer join.
    3. INVOICE we want to access last because it seems to be least restricted, it is the biggest, and it has the outer join condition so it will manufacture rows to match as many rows as come back from account_history.
    Try the query above after creating the following composite indexes. The order of the columns is important:create index account_composite_i on account(account_type_id, account_balance, account_id);
    create index acct_history_comp_i on account_history(account_id, invoice_id, adjustment_id, current_balance, previous_balance, effective_start_date);
    create index invoice_composite_i on invoice(invoice_id, payment_due_date);All the columns used in the where clause will be indexed, in a logical order suited to the needs of the query. Plus each selected column is indexed as well so that we should not need to touch the tables at all to satisfy the query.
    Try the query after creating these indexes.
    A final suggestion is to try larger sort and hash area sizes and a manual workarea policy.alter session set workarea_size_policy = manual;
    alter session set sort_area_size = 2147483647;
    alter session set hash_area_size = 2147483647;

  • My folders take forever to open and then the docs within take a long time for the icon to pop up. the same thing with moving itmes from the desktop to a folder, and also emptying the trashh

    my folders take forever to open and then the docs within take a long time for the icon to pop up. the same thing with moving itmes from the desktop to a folder, and also emptying the trashh

    Don't know if that would be a failing hard drive, but it may be that you are out of available space. How much hard drive space do you have available? Please highlight the Macintosh HD icon and then press Command and I for a get info window. Once open, please copy and post the following:
    Capacity:
    Used:
    Available:
    Mac OS requires a minimum of 10 - 15% of total hard drive space available and empty at all times in order to operate properly.

Maybe you are looking for

  • Does anyone know how to work iPhoto?

    Im trying to work out how to use iphoto? I have all these photos that i have taken over the years and now that i have the time to sort them out im not sure what to do with the photos that i havent put into a folder. I have put the ones that i want in

  • Adobe Reader 9.4  won't allow saving-copying-printing of data entered into form fields.

    Hello, all.  I own a fully automated Continuing Education website with a national customer base.  The release of Adobe Reader 9.4 has brought a major problem for us which we haven't been able to overcome, and it's a critical issue which will destroy

  • Spry Menu and website differ on linked pages

    Two pages on my website (www.SimplyGreen.biz) are pointing to an incorrect page on my Spry Menu Bar.  When I look at the Spry Menu Bar set up - it is correct and when I look at the code behind that menu bar - it is pointing to the correct page also. 

  • Information is lost after redeployment of SAPMEINT - which workaround?

    Hello! After redeployment of SAPMEINT I noticed that some information concerning the SAMEINT MII webservices gets lost. I corrected this information manually afterwards - the information can be found in the old SAP ME 5.2 documentation (pre SP05). Wh

  • Is it possible to pass value between iView in a Workset?

    Dear all, I created 7 dashboards using VC 7.0. Each dashboard has his own model and iView. I like to add reports(iViews) for each dashboard so there is a list of reports on the left (detail navigation) column for each dashboard.  I created a workset