zoukankan      html  css  js  c++  java
  • FP增加的索引

    1、优化FP_BOM中第839行执行过慢问题,且会出现ORA-01652: 无法通过 128 (在表空间 STGTEMP 中) 扩展 temp 段ORA-06512: 在 "STG.FP_BOM", line 839
    检查发现MST_BOMCOMPONENTS表中BOMID中没有空格,可以却除,另外增加索引

    SELECT DISTINCT AM.SCENARIO_ID,
                        AM.ENGINE_ID,
                        AM.ENTERPRISE,
                        AM.SITEID,
                        AM.PROPERTY,
                        CASE WHEN IC.OLD_ITEM_ID=AM.ITEM THEN IC.NEW_ITEM_ID
                        ELSE AM.ITEM
                        END AS ITEM,
                        AG.BOMID,
                        AG.ROUTINGID,
                        AM.OPERATIONSEQ,
                        AM.PHANTOM,
                        1 NEW_QUANTITY,
                        AM.QTYUOM,
                        AM.SATISFYDMDCOMPLETE,
                        AM.COMPONENTGROUP,
                        AM.EFFSTARTDATE,
                        AM.EFFENDDATE,
                        AM.YIELD,
                        AM.SPLITPERCENT,
                        'AnDan'
         FROM IN_BOM_CHANGE IC 
         JOIN ABPPMGR.MST_ITEMBOMROUTING AG
          ON IC.PARENT_ITEM_ID=AG.ITEM
        JOIN  ABPPMGR.MST_BOMCOMPONENTS AM
        ON  TRIM(AM.BOMID)=SUBSTR(AG.BOMID,1,INSTR(AG.BOMID,'_',1,4)-1)
        WHERE IC.ACTION='MODIFY'
        AND AG.SYS_CREATED_BY='AnDan';
    View Code
    create index ABPPMGR.idx_MST_BOMCOMPONENTS_DBA01 on  ABPPMGR.MST_BOMCOMPONENTS(BOMID);

     2、

    SELECT DISTINCT AM.SCENARIO_ID,
                        AM.ENGINE_ID,
                        AM.ENTERPRISE,
                        AM.SITEID,
                        AM.PROPERTY,
                        CASE WHEN IC.OLD_ITEM_ID=AM.ITEM THEN IC.NEW_ITEM_ID
                        ELSE AM.ITEM
                        END AS ITEM,
                        AG.BOMID,
                        AG.ROUTINGID,
                        AM.OPERATIONSEQ,
                        AM.PHANTOM,
                        1 NEW_QUANTITY,
                        AM.QTYUOM,
                        AM.SATISFYDMDCOMPLETE,
                        AM.COMPONENTGROUP,
                        AM.EFFSTARTDATE,
                        AM.EFFENDDATE,
                        AM.YIELD,
                        AM.SPLITPERCENT,
                        'AnDan'
         FROM IN_BOM_CHANGE IC 
         JOIN ABPPMGR.MST_ITEMBOMROUTING AG
          ON IC.PARENT_ITEM_ID=AG.ITEM
        JOIN  ABPPMGR.MST_BOMCOMPONENTS AM
        ON  TRIM(AM.BOMID)=SUBSTR(AG.BOMID,1,INSTR(AG.BOMID,'_',1,4)-1)
        WHERE IC.ACTION='MODIFY'
        AND AG.SYS_CREATED_BY='AnDan';
    View Code
    create  index ABPPMGR.idx_MST_ITEMBOMROUTING_dba01 on ABPPMGR.MST_ITEMBOMROUTING(ITEM);
    create  index ABPPMGR.idx_MST_ITEMBOMROUTING_dba02 on ABPPMGR.MST_ITEMBOMROUTING(BOMID);
    create bitmap index ABPPMGR.idx_MST_ITEMBOMROUTING_dba03 on ABPPMGR.MST_ITEMBOMROUTING(SYS_CREATED_BY);
  • 相关阅读:
    PHP技巧通过COM使用ADODB
    PHP开发环境安装配置全攻略
    散列表
    poj Antiprime Sequences
    HDU 2011 菜鸟杯
    UVA The ? 1 ? 2 ? ... ? n = k problem
    poj 3126 Prime Path
    uva 699 The Falling Leaves
    UVA Steps
    poj 1426 Find The Multiple
  • 原文地址:https://www.cnblogs.com/Snowfun/p/9081632.html
Copyright © 2011-2022 走看看