Planning by Operations

After Creating Forecasts and running the MRP
process, I found that the demand dates for material and assemblies corresponded to
Work Order Start dates instead of Operation
Start dates.
Why is this happenning and how do I change the demand date to Operation Start dates?

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dan Cohen ([email protected]):
After Creating Forecasts and running the MRP
process, I found that the demand dates for material and assemblies corresponded to
Work Order Start dates instead of Operation
Start dates.
Why is this happenning and how do I change the demand date to Operation Start dates?<HR></BLOCKQUOTE>
There is an option on the plan options form to plan to order start date or operation start date. You are describing what happens when this is set to order start date. Change the option and rerun your plan.
null

Similar Messages

  • Daily production plan for operations

    Hi, One Production order generally runs for more than 1 month and consist of more than 100 operations and order qty will be one. in this case we want to prepare daily prod plan for operations not for qty. say on 1.6.09 we will do cutting operation, 2.06.09 willdo painting etc in monthly prod paln or weekly prod plan? pls guide how to map this?

    Dear,
    In production order you will get the details of operation plan and scheduling.
    So in OPK8 do the setting for print of LG02     Op. control ticket, LG03     Job Ticket, LV01Time ticket,
    Take a print through CO04N - Print and sent it on shop floor also.
    You use the report like MCPW - Lead times or MCPK.
    Hope clear to you.
    Regards,
    R.Brahmankar

  • Need to select all equipments (PRT) for a plan (routing) operation (PLPO)

    hi,
    I need to select all assigned equipments (PRT) for a plan (routing) operation (PLPO).
    Can anybody tell me the database table relation or is there a function module or a BAPI or something like this !?
    Thanks
    Olaf
    Edited by: Olaf Krüger on Feb 20, 2008 12:03 PM:  BADI to BAPI

    I suppose you have every PLPO needed (else look at function module WOSTS_TASKLIST_READ_FROM_DB)
    Then read
    PLMZ Allocation of bill of material items to operations
    STPO BOM item
    SELECT * FROM plmz INTO TABLE t_plmz
        FOR ALL ENTRIES IN t_plpo
        WHERE plnty = t_plpo-plnty
          AND plnnr = t_plpo-plnnr
          AND plnkn = t_plpo-plnkn.
      SELECT * FROM stpo INTO TABLE t_stpo
        FOR ALL ENTRIES IN t_plmz
        WHERE stlty = t_plmz-stlty
          AND stlnr = t_plmz-stlnr
          AND stlkn = t_plmz-stlkn.
    Regards

  • Load distribution of a Planned Order Operation

    Hi All,
    Need help in understanding an issue here.
    For a Planned Order, detailed scheduling happened ,and schedule and Cpacity requirements were generated.
    This is the case with just 1 operation. The requirement of this operation is of 1 Hour and schedule was created in Planned Order for the date- 01.07.2014.
    But when we go for the capacity evaluation, in CM01> It shows load devide over two periods> 30.06.2014 and 01.07.2014.
    That is,
    For, 30.06.2014 load is-->0.614 hrs. Though, Latest start data and time still is same as in Planned order[01.07.2014]
    and for 01.07.2014 load is>0.386 hrs. Latest start data and time still is same as in Planned order[01.07.2014]>Which is normal
    That is a total of 1 hour.
    Please help me understand what made this happen in Capacity evaluation, why we have different data in Planned Order and in CM01.
    Why the load got devided over
    Regards,
    Avinash

    Hi,
    To add further and to more precise, the issue is:
    In CM01[or in any capacity evaluation tcode], In a particular maonths load[Period] the opeartion from different month is showing up.
    For example: if Period[month] 06 is veiwed of a Workcenter load, a line[load appears], whose earliest date is in 7th month[01.07.2014].
    I expected to see, only Workcenters scheduled in 6th month to show up in the load evaluation.
    Please look at the screen shot.
    Regards,
    Avinash

  • Change planned order operations

    Dear guru ,
    i must develop an abap program that must change the operations of a planned order.
    I can insert or delete the operations of the planned order.
    Which best solution (BAPI,user exit ..) can you suggest ?
    Thanks

    Hi
    there is no solution to this answer. you can't change operations in a PLANNED order. planned orders only refer to the master data (BOM, Routing, master recipe, task list, ...).
    You have to either change the operations in the routing, recipie, task list, ... (if it is a change for all new orders) or convert the planned order to a PRODUCTION/PROCESS order and manipulate the operations there (if it is a one-off change)
    Other options include the use of production versions as setup in MRP-4 of the material.
    Björn

  • Strategy plan- Automatic operation selection in tasklist

    Dear PM Experts,
    I have a requirement in strategy plan, where the strategy plan MIX_TRUCK which has 1M, 3M, 6M & 1Yr(Heirarchy-1) time based cycles.
    Now i have a tasklist CON_TRUCK, which consist of all operations which covers all time cycles (1yr, 6M, 3M&1M)
    I assigned this taskist & strategy plan to maintenance plan MIX_TR.
    Now currently whenever the maintenance order created from this maintenance plan MIX_TR, all the operations in the task list are selected.
    But my requirement is to select some operations for 1yr, and another set of operations for 6M, and different set for 3M.
    Is it possible with configurable tasklist? If not is there any other alternate method to achieve?
    Your valuable suggestions are highly appreciated........
    VINOD.V

    Attach your Operations assignment to Packages screen shot. Attach your Maintenance Strategy Packages screen shot. Attach your Call object operations tab which has been created screen shot.
    Also, mention how do you want to have that??
    Hope, you might have done something same like the above screen shot in your task list for operations assignment to packages.
    If you want only "Operation 3" & "Operation 6" to be called at 3 months & only "Operation 4" & "Operation 5" to be called at 6 months interval, etc., use Hierarchy option for the packages in IP11.
    Not sure, you are talking about this or something else. Please elaborate more if query is talking about something else.

  • Single plan across operating units

    Hi All,
    I am new to planning. I've a basic doubt on which i require clarity.
    I've two operating units A & B. The master org (M1) belongs to one of these OUs. Is it necessary for me define the plan in master org to include data from all the orgs? or can i define the plan in any of the orgs?
    Plz help.
    Thanks,
    Sunil

    There are 2 possibilities here, either there is nothing snapshotted or the workbench preferences are not set right.
    For the first possibility you can verify data in the tables. For example look at msc_system_items; there should be records present for the plan
    select count(*) from msc_system_items
    where plan_id = &plan_id.
    To see if there is demand, use the table msc_demands, for supplies use msc_supplies.
    If that shows records, then look at the WB preferences (tools menu)
    Look at the 'Other' tab. Item category set should be one to which all the items are assigned that you are planning for. Also ensure that the view recommendations field is set high enough (eg spanning the planning horizon). Additionally in the other tabs ensure that you have selected the relevant supply/demand.
    It could also be that a folder is being used in the workbench (or default query). That is another point which can be looked at.

  • Explain plan window, "operation" column is very narrow in 2.1 EA2

    When widened, it becomes narrow in next attempt to get an explain plan.

    Hi Raghu,
    SQL Dev 2.1 Prod.
    A simple way to replicate this issue is :
    - Invoke an execution plan for query against partitioned table
    The execution plan gets narrowed every time partition start and partition stop column appear.
    And execution plan against non-partitioned table will re-adjust the column width to its preserved size.
    Regards,
    Buntoro

  • Transfer cost planning to operative

    hi
    We r using CJ40 and unit costing where v r planning materials.
    i want to transfer these planned material to be transferred to projects ( networks). How?
    Regards
    KP

    It is not possible to transfer material codes you have used for unit cost planning.  Actual material will have to be attached to network activities manually.  As of now i.e. in ECC 6.0 there is no facility to transfer the material codes used in unit cost planning to be used for procurement directly.  However, there is a facility called easy cost planning.  Material code used there can be converted as procurement item using easy execution services.

  • Operation planning in order

    Dear PM experts,
    in operation tab in the PM order when i enter the duration of the operation and press enter for planning the operation the system gives me the time to start the operation and the time to end it but its not synchronized with the time i create the order , how can i synchronize the starting time of the operation with the time which iam creating the order in ?
    thank you in advance
    Edited by: serry1 on Mar 27, 2011 4:11 PM

    Hi,
    Then try to change the Work Center time from 12 AM in capacity tab, so that will give you order creation time as start time.
    Also in IMG under Scheduling Parameters for PM Orders, in adjust dates select "Adjust based on Order Start date".
    Then try the same.
    Regards,
    Maheswaran.

  • Transfer LTP planned orders to Operational planned orders

    Hi
    Can anyone suggest how to transfer planned orders generated from LTP(Long Term Plan) to Operational Plan?
    Regards
    Pradipta Sahoo

    Dear Sahoo,
    You can transfer the simulative planned orders to operative planning using T Code MD43.
    Check this,
    Copying the Long-Term Planning Results to Operative Planning  
    Use
    Once you have optimized the results of long-term planning, you can copy them to operative planning.
    It is not only possible to copy the demand program to operative planning, you can also copy the planned orders firmed in long-term planning per material using the MRP transaction Interactive single-item planning.
    When copying the results to operative planning, you can set the system to create purchase requisitions and delivery schedules instead of planned orders for materials procured externally.
    Prerequisites
    You must firm the simulative planned orders you want to copy to operative planning. You can firm planned orders by:
    Making manual changes
    Using the planning time fence
    Setting a manual firming date
    If, when copying the data to operative planning, you want the system to create purchase requisitions or delivery schedules for materials procured externally instead of planned orders, enter the appropriate indicators in the Create pur. req. and Schedule lines on the initial screen of single-item, interactive planning (in MRP).
    When copying the results to operative planning, the system does not carry out any source determination. If you want the system to create delivery schedules and purchase requisitions to which a vendor has already been assigned, you must maintain the necessary master data in the Purchasing menu before carrying out the planning run in long-term planning.
    http://help.sap.com/saphelperp60_sp/helpdata/en/92/bf02af44bd11d182b40000e829fbfe/content.htm_
    Regards
    Mangalraj.S

  • Error while activating BI Content infocube - 0IMFA_1(IM: Assigned Plan Bud)

    Dear All,
    While I am trying to activate the Business Content cube 0IMFA_1(IM: Assigned Plan Budget (Operative) ) with Collection Mode 'Automatic' and Grouping ' In dataflow bef and afterwords', I am getting the following error -
    " Object 0IMPLAN (Currency Translation Type,CTRT) could not be collected for object 1308CQ25VCD0H9UCVDTKXM7BB (Query,ELEM)
    Message no. RSO296
    Diagnosis
    You have collected objects in the BI Metadata Repository. Associated objects for object 1308CQ25VCD0H9UCVDTKXM7BB of type Query,ELEM have also been collected. Object 0IMPLAN of type Currency Translation Type,CTRT was among these objects.
    However, this object 0IMPLAN of type Currency Translation Type,CTRT is not available in the metadata repository.
    System Response
    Object 0IMPLAN of type Currency Translation Type,CTRT is ignored in further collections. The links for object 1308CQ25VCD0H9UCVDTKXM7BB of type Query,ELEM are incomplete. This may result in you not being able to activate this object.
    Procedure
    If this error occurs while you are installing BI Content, an error may have occurred during the delivery. Inform SAP. In all other cases, check that the object has not been deleted by another user during collection, for example. "
    I am unable even to find this object.
    Kindly let me know how to solve this issue.
    Many Thanks in Advance,
    With Warm Regards,
    Vineeth

    The log says, infoobject 0IMPLAN is not available in Metadata repository.
    To make sure, RSA1--> BI Content --> Object types --> under InfoObject (middle window), double click 'Select Objects' and search for infoobject '0IMPLAN'. (in ur system its not available).
    What u have to do is:
    Either collect object by selecting Grouping ' In dataflow before' , so that u can insatll all backend objects and do the data loads.
    Then, install frontend object,by selecting Grouping ' In dataflow afterwords'
    OR
    Since u have selected Grouping ' In dataflow bef and afterwords'...
    After the collection is over, from right most window, select 'Query elements'  --> right click --> Donot install any below
    Do the same for BEx web template, Web Items, Querey Views, workbooks etc

  • Multiple Executions Plans for the same SQL statement

    Dear experts,
    awrsqrpt.sql is showing multiple executions plans for a single SQL statement. How is it possible that one SQL statement will have multiple Executions Plans within the same AWR report.
    Below is the awrsqrpt's output for your reference.
    WORKLOAD REPOSITORY SQL Report
    Snapshot Period Summary
    DB Name         DB Id    Instance     Inst Num Release     RAC Host
    TESTDB          2157605839 TESTDB1               1 10.2.0.3.0  YES testhost1
                  Snap Id      Snap Time      Sessions Curs/Sess
    Begin Snap:     32541 11-Oct-08 21:00:13       248     141.1
      End Snap:     32542 11-Oct-08 21:15:06       245     143.4
       Elapsed:               14.88 (mins)
       DB Time:               12.18 (mins)
    SQL Summary                            DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
                    Elapsed
       SQL Id      Time (ms)
    51szt7b736bmg     25,131
    Module: SQL*Plus
    UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(ACCT_DR_BAL,
    0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND TEST_ACC_NB = ACCT_ACC_NB(+)) WHERE
    TEST_BATCH_DT = (:B1 )
    SQL ID: 51szt7b736bmg                  DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    -> 1st Capture and Last Capture Snap IDs
       refer to Snapshot IDs witin the snapshot range
    -> UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(AC...
        Plan Hash           Total Elapsed                 1st Capture   Last Capture
    #   Value                    Time(ms)    Executions       Snap ID        Snap ID
    1   2960830398                 25,131             1         32542          32542
    2   3834848140                      0             0         32542          32542
    Plan 1(PHV: 2960830398)
    Plan Statistics                        DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
       into the Total Database Time multiplied by 100
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                            25,131       25,130.7     3.4
    CPU Time (ms)                                23,270       23,270.2     3.9
    Executions                                        1            N/A     N/A
    Buffer Gets                               2,626,166    2,626,166.0    14.6
    Disk Reads                                      305          305.0     0.3
    Parse Calls                                       1            1.0     0.0
    Rows                                        371,735      371,735.0     N/A
    User I/O Wait Time (ms)                         564            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                 26            N/A     N/A
    Execution Plan
    | Id  | Operation                    | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT             |                 |       |       |  1110 (100)|          |
    |   1 |  UPDATE                      | TEST            |       |       |            |          |
    |   2 |   TABLE ACCESS FULL          | TEST            |   116K|  2740K|  1110   (2)| 00:00:14 |
    |   3 |   TABLE ACCESS BY INDEX ROWID| ACCT            |     1 |    26 |     5   (0)| 00:00:01 |
    |   4 |    INDEX RANGE SCAN          | ACCT_DT_ACC_IDX |     1 |       |     4   (0)| 00:00:01 |
    Plan 2(PHV: 3834848140)
    Plan Statistics                        DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
       into the Total Database Time multiplied by 100
    Stat Name                                Statement   Per Execution % Snap
    Elapsed Time (ms)                                 0            N/A     0.0
    CPU Time (ms)                                     0            N/A     0.0
    Executions                                        0            N/A     N/A
    Buffer Gets                                       0            N/A     0.0
    Disk Reads                                        0            N/A     0.0
    Parse Calls                                       0            N/A     0.0
    Rows                                              0            N/A     N/A
    User I/O Wait Time (ms)                           0            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                 26            N/A     N/A
    Execution Plan
    | Id  | Operation                    | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | UPDATE STATEMENT             |              |       |       |     2 (100)|          |
    |   1 |  UPDATE                      | TEST         |       |       |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| TEST         |     1 |    28 |     2   (0)| 00:00:01 |
    |   3 |    INDEX RANGE SCAN          | TEST_DT_IND  |     1 |       |     1   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS BY INDEX ROWID| ACCT         |     1 |    26 |     4   (0)| 00:00:01 |
    |   5 |    INDEX RANGE SCAN          | INDX_ACCT_DT |     1 |       |     3   (0)| 00:00:01 |
    Full SQL Text
    SQL ID       SQL Text
    51szt7b736bm UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL, 0) +
                  NVL(ACCT_DR_BAL, 0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND PB
                 RN_ACC_NB = ACCT_ACC_NB(+)) WHERE TEST_BATCH_DT = (:B1 )Your input is highly appreciated.
    Thanks for taking your time in answering my question.
    Regards

    Oracle Lover3 wrote:
    Dear experts,
    awrsqrpt.sql is showing multiple executions plans for a single SQL statement. How is it possible that one SQL statement will have multiple Executions Plans within the same AWR report.If you're using bind variables and you've histograms on your columns which can be created by default in 10g due to the "SIZE AUTO" default "method_opt" parameter of DBMS_STATS.GATHER__STATS it is quite normal that you get different execution plans for the same SQL statement. Depending on the values passed when the statement is hard parsed (this feature is called "bind variable peeking" and enabled by default since 9i) an execution plan is determined and re-used for all further executions of the same "shared" SQL statement.
    If now your statement ages out of the shared pool or is invalidated due to some DDL or statistics gathering activity it will be re-parsed and again the values passed in that particular moment will determine the execution plan. If you have skewed data distribution and a histogram in place that reflects that skewness you might get different execution plans depending on the actual values used.
    Since this "flip-flop" behaviour can sometimes be counter-productive if you're unlucky and the values used to hard parse the statement leading to a plan that is unsuitable for the majority of values used afterwards, 11g introduced the "adaptive" cursor sharing that attempts to detect such a situation and can automatically re-evaluate the execution plan of the statement.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Exactly how bad is this explain plan?

    Hi,
    I'm on Oracle 9i - 9.2.0.6.0.
    First, please excuse my question, I'm not that good at reading explain plans.
    I have this explain plan:
    | Id  | Operation                                 |  Name                      | Rows  | Bytes |TempSpc| Cost (%CPU)|                                                              
    |   0 | SELECT STATEMENT                          |                            | 70057 |    20M|       |   114K (12)|                                                              
    |*  1 |  FILTER                                   |                            |       |       |       |            |                                                              
    |   2 |   TABLE ACCESS FULL                       | DUAL                       |    82 |       |       |     3  (34)|                                                              
    |*  3 |   INDEX RANGE SCAN                        | CHANGELOG_1                |     1 |    44 |       |  2217   (3)|                                                              
    |   4 |  NESTED LOOPS OUTER                       |                            | 70057 |    20M|       |   114K (12)|                                                              
    |   5 |   NESTED LOOPS OUTER                      |                            | 67062 |    18M|       |   113K (11)|                                                              
    |   6 |    NESTED LOOPS OUTER                     |                            | 64194 |    16M|       |   111K (10)|                                                              
    |   7 |     NESTED LOOPS OUTER                    |                            | 61450 |    14M|       |   110K  (9)|                                                              
    |   8 |      NESTED LOOPS OUTER                   |                            | 58823 |    13M|       |   109K  (8)|                                                              
    |   9 |       NESTED LOOPS OUTER                  |                            | 56308 |    12M|       |   107K  (6)|                                                              
    |  10 |        NESTED LOOPS OUTER                 |                            | 53900 |    11M|       |   106K  (5)|                                                              
    |  11 |         NESTED LOOPS OUTER                |                            | 51596 |    10M|       |   105K  (4)|                                                              
    |  12 |          NESTED LOOPS OUTER               |                            | 49390 |  9212K|       |   104K  (3)|                                                              
    |  13 |           NESTED LOOPS OUTER              |                            | 47278 |  8310K|       |   102K  (2)|                                                              
    |* 14 |            HASH JOIN                      |                            | 31639 |  5067K|  4576K|  7331  (13)|                                                              
    |* 15 |             HASH JOIN                     |                            | 31639 |  4202K|  1936K|  1372   (9)|                                                              
    |  16 |              TABLE ACCESS FULL            | COMPANY                    | 76111 |  1040K|       |   335  (15)|                                                              
    |* 17 |              HASH JOIN                    |                            | 31649 |  3770K|       |   933   (7)|                                                              
    |  18 |               TABLE ACCESS FULL           | AGREEMENT                  |   149 |  3129 |       |     3  (34)|                                                              
    |* 19 |               HASH JOIN                   |                            | 31649 |  3121K|       |   928   (6)|                                                              
    |  20 |                TABLE ACCESS FULL          | CONCRETEAGREEMENT          | 34172 |   333K|       |    55  (24)|                                                              
    |* 21 |                TABLE ACCESS BY INDEX ROWID| SPECIFICATION              | 31649 |  2812K|       |   866   (4)|                                                              
    |* 22 |                 INDEX RANGE SCAN          | SPECIFICATION_DATE         | 37437 |       |       |   143   (5)|                                                              
    |  23 |             TABLE ACCESS FULL             | PERSON                     |  1786K|    47M|       |  4584  (11)|                                                              
    |* 24 |            TABLE ACCESS BY INDEX ROWID    | INFORMATION                |     1 |    16 |       |     4  (25)|                                                              
    |* 25 |             INDEX RANGE SCAN              | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 26 |           TABLE ACCESS BY INDEX ROWID     | INFORMATION                |     1 |    11 |       |            |                                                              
    |* 27 |            INDEX RANGE SCAN               | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 28 |          TABLE ACCESS BY INDEX ROWID      | INFORMATION                |     1 |    14 |       |            |                                                              
    |* 29 |           INDEX RANGE SCAN                | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 30 |         TABLE ACCESS BY INDEX ROWID       | INFORMATION                |     1 |    14 |       |            |                                                              
    |* 31 |          INDEX RANGE SCAN                 | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 32 |        TABLE ACCESS BY INDEX ROWID        | INFORMATION                |     1 |    11 |       |            |                                                              
    |* 33 |         INDEX RANGE SCAN                  | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 34 |       TABLE ACCESS BY INDEX ROWID         | INFORMATION                |     1 |    13 |       |            |                                                              
    |* 35 |        INDEX RANGE SCAN                   | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 36 |      TABLE ACCESS BY INDEX ROWID          | INFORMATION                |     1 |    12 |       |            |                                                              
    |* 37 |       INDEX RANGE SCAN                    | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 38 |     TABLE ACCESS BY INDEX ROWID           | INFORMATION                |     1 |    15 |       |            |                                                              
    |* 39 |      INDEX RANGE SCAN                     | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 40 |    TABLE ACCESS BY INDEX ROWID            | INFORMATION                |     1 |    17 |       |            |                                                              
    |* 41 |     INDEX RANGE SCAN                      | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    |* 42 |   TABLE ACCESS BY INDEX ROWID             | INFORMATION                |     1 |    17 |       |            |                                                              
    |* 43 |    INDEX RANGE SCAN                       | INFORMATION_SPECIFICATION  |     2 |       |       |     3  (34)|                                                              
    ---------------------------------------------------------------------------------------------------------------------                     I can see that there are some FULL TABLE SCAN, but this may be OK. What worries me is the combination with numerous NESTED LOOPS.
    A CTAS for approx 500.000 records out of 14.000.000 runs in about 180 mins. This is too much. My guess is that it should/could be brought down to something like 20 min.
    For completeness, the query in question:
    SELECT *
      FROM stik_spec_inf_v
    WHERE spdate >= to_date('15-03-2008', 'dd-mm-yyyy')
       AND spdate < to_date('15-04-2008', 'dd-mm-yyyy');Wher eview is created as
    CREATE OR REPLACE FORCE VIEW stik_spec_inf_v
    AS
       SELECT CAST(1 AS NUMBER(3)) dataversion
             ,sp.ID AS spid
             ,sp."DATE" AS spdate
             ,sp.valuedate
             ,sp.amount
             ,sp.amountcode
             ,sp.periodstart
             ,sp.periodend
             ,sp.ambcode
             ,sp.state AS spstate
             ,sp."TYPE" AS sptype
             ,sp.respitedate
             ,sp.stopcode
             ,sp.validcode
             ,sp.person
             ,sp.company
             ,sp.concreteagreement
             ,sp.reconciliation
             ,sp.partialscheme
             ,(SELECT 1
                 FROM dual
                WHERE EXISTS(
                         SELECT 1
                           FROM changelog
                          WHERE targetclass = 'com.csc.jpay.voucher.Specification'
                            AND targetid = sp.ID)) spchanged
             ,i1.startdate AS daekgagedato
             ,i1.amount AS daekgage
             ,i2.startdate AS prmgagedato
             ,i2.amount AS prmgage
             ,i3.employerpercent
             ,i3.employeepercent
             ,i3.voluntarypercent
             ,i5.salaryperiod
             ,i6.groupcontractcode
             ,i7.workinghourspercent
             ,i9.startdate AS hiringdate
             ,i10.startdate AS resignationdate
             ,i21.policenumber
             ,ix."TYPE" AS leavecode
             ,ix.startdate AS leavestartdate
             ,ix.enddate AS leaveenddate
             ,pe.cpr
             ,pe.ksdid
             ,co.opkr_number
             ,a.NAME AS agreement_name
         FROM SPECIFICATION sp
             ,information i1
             ,information i2
             ,information i3
             ,information i5
             ,information i6
             ,information i7
             ,information i9
             ,information i10
             ,information i21
             ,information ix
             ,person pe
             ,company co
             ,concreteagreement ca
             ,agreement a
        WHERE 1 = 1
          AND i1.SPECIFICATION(+) = sp.ID
          AND i1."TYPE"(+) = 1
          AND i2.SPECIFICATION(+) = sp.ID
          AND i2."TYPE"(+) = 2
          AND i3.SPECIFICATION(+) = sp.ID
          AND i3."TYPE"(+) = 3
          AND i5.SPECIFICATION(+) = sp.ID
          AND i5."TYPE"(+) = 5
          AND i6.SPECIFICATION(+) = sp.ID
          AND i6."TYPE"(+) = 6
          AND i7.SPECIFICATION(+) = sp.ID
          AND i7."TYPE"(+) = 7
          AND i9.SPECIFICATION(+) = sp.ID
          AND i9."TYPE"(+) = 9
          AND i10.SPECIFICATION(+) = sp.ID
          AND i10."TYPE"(+) = 10
          AND i21.SPECIFICATION(+) = sp.ID
          AND i21."TYPE"(+) = 21
          AND ix.SPECIFICATION(+) = sp.ID
          AND ix."TYPE"(+) > 10
          AND ix."TYPE"(+) < 21
          AND pe.ID = sp.person
          AND co.ID = sp.company
          AND ca.ID = sp.concreteagreement
          AND a.ID = ca.agreement;Please excuse my lengthy post. I still hope for some valuable input.
    Thanks
    Peter

    Hi,
    I have tried with an in-line view as John suggested. This give a FULL TABLE SCAN on information.
    SELECT /*+ RULE */ * FROM (
        SELECT sp.id spid, sp."DATE" spdate
         FROM (SELECT   SPECIFICATION
                       ,max(decode("TYPE", 1, startdate)) daekgagedato
                       ,max(decode("TYPE", 1, amount)) daekgage
                       ,max(decode("TYPE", 2, startdate)) prmgagedato
                       ,max(decode("TYPE", 2, amount)) prmgage
                       ,max(decode("TYPE", 3, employerpercent)) employerpercent
                       ,max(decode("TYPE", 3, employeepercent)) employeepercent
                       ,max(decode("TYPE", 3, voluntarypercent)) voluntarypercent
                       ,max(decode("TYPE", 5, salaryperiod)) salaryperiod
                       ,max(decode("TYPE", 6, groupcontractcode)) groupcontractcode
                       ,max(decode("TYPE", 7, workinghourspercent)) workinghourspercent
                       ,max(decode("TYPE", 9, startdate)) hiringdate
                       ,max(decode("TYPE", 10, startdate)) resignationdate
                       ,max(decode("TYPE", 21, policenumber)) policenumber
                       ,max(decode(sign("TYPE" - 10),1, decode(sign("TYPE" - 21), -1, "TYPE"))) leavecode
                       ,max(decode(sign("TYPE" - 10),1, decode(sign("TYPE" - 21), -1, startdate))) leavestartdate
                       ,max(decode(sign("TYPE" - 10),1, decode(sign("TYPE" - 21), -1, enddate))) leaveenddate
                   FROM information
                  WHERE TYPE BETWEEN 1 AND 21
               GROUP BY SPECIFICATION) i
             ,SPECIFICATION sp
        WHERE 1 = 1
          AND sp.ID = i.SPECIFICATION)
    WHERE spid = 1Any ideas on how to get around that?
    Regards
    Peter

  • Bytes in execution plans shows high value in oracle 11.2.0.3 than 10.2.0.4

    Hi,
    I copied data from 10.2.0.4 database to 11.2.0.3, gathered stats similar to 10.2.0.4 database and running same query against both database.
    Bytes shows 257 in 10.2.0.4 and 2263 in 11.2.0.3. Both plans are using index access. Can someone help me why I see this discrepancy?
    Thank You
    Sarayu
    select * from TABLE_1 where column_1 = 12345
    Oracle 10.2.0.4
    Execution Plan
    | Id  | Operation                   | Name          | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT            |               |     1 |   257 |     3   (0)|
    |   1 |  TABLE ACCESS BY INDEX ROWID| TABLE_1       |     1 |   257 |     3   (0)|
    |*  2 |   INDEX UNIQUE SCAN         | IDX_TABLE_1   |     1 |       |     2   (0)|
    ----------------------------------------------------------------------------------Oracle 11.2.0.3
    | Id  | Operation                   | Name          | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |               |     1 |  2263 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| TABLE_1       |     1 |  2263 |     3   (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN         | IDX_TABLE_1   |     1 |       |     2   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------Edited by: user13312943 on Oct 15, 2012 8:35 AM

    That would seem to imply that the 11.2.0.3 database expects one row of the table to occupy 2263 bytes while the 10.2.0.4 database expects one row of the table to occupy 257 bytes. Which estimate is closer to the correct value? How much space does the table occupy in each database? How many rows are in each database?
    Justin

Maybe you are looking for