首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Oracle重复数据消除花费的时间太长

Oracle重复数据消除花费的时间太长
EN

Stack Overflow用户
提问于 2016-07-11 20:32:43
回答 0查看 38关注 0票数 0

因此,我在上周(一天结束时)从生产环境中拉下的一张表中有一些完美的副本,我非常确定我没有勾选TOAD中截断的第一个框,并且在我的表中有一堆不错的副本。我正在运行以下查询:

代码语言:javascript
复制
DELETE
from MMI_OWNER.IMART_TTI_RET_MY_CUSTOMERS A1
where exists (Select 'x' from MMI_OWNER.IMART_TTI_RET_MY_CUSTOMERS A2
              where A1.ROWID <> A2.ROWID
              and   ((A1.MEASURE_ID = A2.MEASURE_ID) or ((A1.MEASURE_ID is null) and (A2.MEASURE_ID is null)))
              and   ((A1.MEASURE_NAME = A2.MEASURE_NAME) or ((A1.MEASURE_NAME is null) and (A2.MEASURE_NAME is null)))
              and   ((A1.MEASURE_DESCRIPTION = A2.MEASURE_DESCRIPTION) or ((A1.MEASURE_DESCRIPTION is null) and (A2.MEASURE_DESCRIPTION is null)))
              and   ((A1.MEASURE_FORMAT = A2.MEASURE_FORMAT) or ((A1.MEASURE_FORMAT is null) and (A2.MEASURE_FORMAT is null)))
              and   ((A1.ENTITY_ID = A2.ENTITY_ID) or ((A1.ENTITY_ID is null) and (A2.ENTITY_ID is null)))
              and   ((A1.ENTITY_DESCRIPTION = A2.ENTITY_DESCRIPTION) or ((A1.ENTITY_DESCRIPTION is null) and (A2.ENTITY_DESCRIPTION is null)))
              and   ((A1.PARENT_ENTITY_ID = A2.PARENT_ENTITY_ID) or ((A1.PARENT_ENTITY_ID is null) and (A2.PARENT_ENTITY_ID is null)))
              and   ((A1.HAS_CHILDREN = A2.HAS_CHILDREN) or ((A1.HAS_CHILDREN is null) and (A2.HAS_CHILDREN is null)))
              and   ((A1.HAS_HIERARCHY = A2.HAS_HIERARCHY) or ((A1.HAS_HIERARCHY is null) and (A2.HAS_HIERARCHY is null)))
              and   ((A1.HAS_PEOPLE = A2.HAS_PEOPLE) or ((A1.HAS_PEOPLE is null) and (A2.HAS_PEOPLE is null)))
              and   ((A1.IS_BRANCH = A2.IS_BRANCH) or ((A1.IS_BRANCH is null) and (A2.IS_BRANCH is null)))
              and   ((A1.PARTITION_KEY = A2.PARTITION_KEY) or ((A1.PARTITION_KEY is null) and (A2.PARTITION_KEY is null)))
              and   ((A1.SORT_ORDER = A2.SORT_ORDER) or ((A1.SORT_ORDER is null) and (A2.SORT_ORDER is null)))
              and   ((A1.WEEK_MINUS_1 = A2.WEEK_MINUS_1) or ((A1.WEEK_MINUS_1 is null) and (A2.WEEK_MINUS_1 is null)))
              and   ((A1.WEEK_MINUS_1_FORMAT = A2.WEEK_MINUS_1_FORMAT) or ((A1.WEEK_MINUS_1_FORMAT is null) and (A2.WEEK_MINUS_1_FORMAT is null)))
              and   ((A1.WEEK_MINUS_1_PERF = A2.WEEK_MINUS_1_PERF) or ((A1.WEEK_MINUS_1_PERF is null) and (A2.WEEK_MINUS_1_PERF is null)))
              and   ((A1.WEEK_MINUS_1_PERF_RAG = A2.WEEK_MINUS_1_PERF_RAG) or ((A1.WEEK_MINUS_1_PERF_RAG is null) and (A2.WEEK_MINUS_1_PERF_RAG is null)))
              and   ((A1.WEEK1 = A2.WEEK1) or ((A1.WEEK1 is null) and (A2.WEEK1 is null)))
              and   ((A1.WEEK1_FORMAT = A2.WEEK1_FORMAT) or ((A1.WEEK1_FORMAT is null) and (A2.WEEK1_FORMAT is null)))
              and   ((A1.WEEK1_PERF = A2.WEEK1_PERF) or ((A1.WEEK1_PERF is null) and (A2.WEEK1_PERF is null)))
              and   ((A1.WEEK1_PERF_RAG = A2.WEEK1_PERF_RAG) or ((A1.WEEK1_PERF_RAG is null) and (A2.WEEK1_PERF_RAG is null)))
              and   ((A1.WEEK2 = A2.WEEK2) or ((A1.WEEK2 is null) and (A2.WEEK2 is null)))
              and   ((A1.WEEK2_FORMAT = A2.WEEK2_FORMAT) or ((A1.WEEK2_FORMAT is null) and (A2.WEEK2_FORMAT is null)))
              and   ((A1.WEEK2_PERF = A2.WEEK2_PERF) or ((A1.WEEK2_PERF is null) and (A2.WEEK2_PERF is null)))
              and   ((A1.WEEK2_PERF_RAG = A2.WEEK2_PERF_RAG) or ((A1.WEEK2_PERF_RAG is null) and (A2.WEEK2_PERF_RAG is null)))
              and   ((A1.WEEK3 = A2.WEEK3) or ((A1.WEEK3 is null) and (A2.WEEK3 is null)))
              and   ((A1.WEEK3_FORMAT = A2.WEEK3_FORMAT) or ((A1.WEEK3_FORMAT is null) and (A2.WEEK3_FORMAT is null)))
              and   ((A1.WEEK3_PERF = A2.WEEK3_PERF) or ((A1.WEEK3_PERF is null) and (A2.WEEK3_PERF is null)))
              and   ((A1.WEEK3_PERF_RAG = A2.WEEK3_PERF_RAG) or ((A1.WEEK3_PERF_RAG is null) and (A2.WEEK3_PERF_RAG is null)))
              and   ((A1.WEEK4 = A2.WEEK4) or ((A1.WEEK4 is null) and (A2.WEEK4 is null)))
              and   ((A1.WEEK4_FORMAT = A2.WEEK4_FORMAT) or ((A1.WEEK4_FORMAT is null) and (A2.WEEK4_FORMAT is null)))
              and   ((A1.WEEK4_PERF = A2.WEEK4_PERF) or ((A1.WEEK4_PERF is null) and (A2.WEEK4_PERF is null)))
              and   ((A1.WEEK4_PERF_RAG = A2.WEEK4_PERF_RAG) or ((A1.WEEK4_PERF_RAG is null) and (A2.WEEK4_PERF_RAG is null)))
              and   ((A1.WEEK5 = A2.WEEK5) or ((A1.WEEK5 is null) and (A2.WEEK5 is null)))
              and   ((A1.WEEK5_FORMAT = A2.WEEK5_FORMAT) or ((A1.WEEK5_FORMAT is null) and (A2.WEEK5_FORMAT is null)))
              and   ((A1.WEEK5_PERF = A2.WEEK5_PERF) or ((A1.WEEK5_PERF is null) and (A2.WEEK5_PERF is null)))
              and   ((A1.WEEK5_PERF_RAG = A2.WEEK5_PERF_RAG) or ((A1.WEEK5_PERF_RAG is null) and (A2.WEEK5_PERF_RAG is null)))
              and   ((A1.FIVEWKAVG = A2.FIVEWKAVG) or ((A1.FIVEWKAVG is null) and (A2.FIVEWKAVG is null)))
              and   ((A1.FIVEWKAVG_FORMAT = A2.FIVEWKAVG_FORMAT) or ((A1.FIVEWKAVG_FORMAT is null) and (A2.FIVEWKAVG_FORMAT is null)))
              and   ((A1.FIVEWKAVG_PERF = A2.FIVEWKAVG_PERF) or ((A1.FIVEWKAVG_PERF is null) and (A2.FIVEWKAVG_PERF is null)))
              and   ((A1.FIVEWKAVG_PERF_RAG = A2.FIVEWKAVG_PERF_RAG) or ((A1.FIVEWKAVG_PERF_RAG is null) and (A2.FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.PREV_FIVEWKAVG = A2.PREV_FIVEWKAVG) or ((A1.PREV_FIVEWKAVG is null) and (A2.PREV_FIVEWKAVG is null)))
              and   ((A1.PREV_FIVEWKAVG_FORMAT = A2.PREV_FIVEWKAVG_FORMAT) or ((A1.PREV_FIVEWKAVG_FORMAT is null) and (A2.PREV_FIVEWKAVG_FORMAT is null)))
              and   ((A1.PREV_FIVEWKAVG_PERF = A2.PREV_FIVEWKAVG_PERF) or ((A1.PREV_FIVEWKAVG_PERF is null) and (A2.PREV_FIVEWKAVG_PERF is null)))
              and   ((A1.PREV_FIVEWKAVG_PERF_RAG = A2.PREV_FIVEWKAVG_PERF_RAG) or ((A1.PREV_FIVEWKAVG_PERF_RAG is null) and (A2.PREV_FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.FIVEWKAVG_CHANGE = A2.FIVEWKAVG_CHANGE) or ((A1.FIVEWKAVG_CHANGE is null) and (A2.FIVEWKAVG_CHANGE is null)))
              and   ((A1.FIVEWKAVG_CHANGE_FORMAT = A2.FIVEWKAVG_CHANGE_FORMAT) or ((A1.FIVEWKAVG_CHANGE_FORMAT is null) and (A2.FIVEWKAVG_CHANGE_FORMAT is null)))
              and   ((A1.FIVEWKAVG_CHANGE_PERF = A2.FIVEWKAVG_CHANGE_PERF) or ((A1.FIVEWKAVG_CHANGE_PERF is null) and (A2.FIVEWKAVG_CHANGE_PERF is null)))
              and   ((A1.FIVEWKAVG_CHANGE_PERF_RAG = A2.FIVEWKAVG_CHANGE_PERF_RAG) or ((A1.FIVEWKAVG_CHANGE_PERF_RAG is null) and (A2.FIVEWKAVG_CHANGE_PERF_RAG is null)))
              and   ((A1.MONTH1 = A2.MONTH1) or ((A1.MONTH1 is null) and (A2.MONTH1 is null)))
              and   ((A1.MONTH1_FORMAT = A2.MONTH1_FORMAT) or ((A1.MONTH1_FORMAT is null) and (A2.MONTH1_FORMAT is null)))
              and   ((A1.MONTH1_PERF = A2.MONTH1_PERF) or ((A1.MONTH1_PERF is null) and (A2.MONTH1_PERF is null)))
              and   ((A1.MONTH1_PERF_RAG = A2.MONTH1_PERF_RAG) or ((A1.MONTH1_PERF_RAG is null) and (A2.MONTH1_PERF_RAG is null)))
              and   ((A1.MONTH2 = A2.MONTH2) or ((A1.MONTH2 is null) and (A2.MONTH2 is null)))
              and   ((A1.MONTH2_FORMAT = A2.MONTH2_FORMAT) or ((A1.MONTH2_FORMAT is null) and (A2.MONTH2_FORMAT is null)))
              and   ((A1.MONTH2_PERF = A2.MONTH2_PERF) or ((A1.MONTH2_PERF is null) and (A2.MONTH2_PERF is null)))
              and   ((A1.MONTH2_PERF_RAG = A2.MONTH2_PERF_RAG) or ((A1.MONTH2_PERF_RAG is null) and (A2.MONTH2_PERF_RAG is null)))
              and   ((A1.MONTH3 = A2.MONTH3) or ((A1.MONTH3 is null) and (A2.MONTH3 is null)))
              and   ((A1.MONTH3_FORMAT = A2.MONTH3_FORMAT) or ((A1.MONTH3_FORMAT is null) and (A2.MONTH3_FORMAT is null)))
              and   ((A1.MONTH3_PERF = A2.MONTH3_PERF) or ((A1.MONTH3_PERF is null) and (A2.MONTH3_PERF is null)))
              and   ((A1.MONTH3_PERF_RAG = A2.MONTH3_PERF_RAG) or ((A1.MONTH3_PERF_RAG is null) and (A2.MONTH3_PERF_RAG is null)))
              and   ((A1.MONTH4 = A2.MONTH4) or ((A1.MONTH4 is null) and (A2.MONTH4 is null)))
              and   ((A1.MONTH4_FORMAT = A2.MONTH4_FORMAT) or ((A1.MONTH4_FORMAT is null) and (A2.MONTH4_FORMAT is null)))
              and   ((A1.MONTH4_PERF = A2.MONTH4_PERF) or ((A1.MONTH4_PERF is null) and (A2.MONTH4_PERF is null)))
              and   ((A1.MONTH4_PERF_RAG = A2.MONTH4_PERF_RAG) or ((A1.MONTH4_PERF_RAG is null) and (A2.MONTH4_PERF_RAG is null)))
              and   ((A1.MONTH5 = A2.MONTH5) or ((A1.MONTH5 is null) and (A2.MONTH5 is null)))
              and   ((A1.MONTH5_FORMAT = A2.MONTH5_FORMAT) or ((A1.MONTH5_FORMAT is null) and (A2.MONTH5_FORMAT is null)))
              and   ((A1.MONTH5_PERF = A2.MONTH5_PERF) or ((A1.MONTH5_PERF is null) and (A2.MONTH5_PERF is null)))
              and   ((A1.MONTH5_PERF_RAG = A2.MONTH5_PERF_RAG) or ((A1.MONTH5_PERF_RAG is null) and (A2.MONTH5_PERF_RAG is null)))
              and   ((A1.MONTH6 = A2.MONTH6) or ((A1.MONTH6 is null) and (A2.MONTH6 is null)))
              and   ((A1.MONTH6_FORMAT = A2.MONTH6_FORMAT) or ((A1.MONTH6_FORMAT is null) and (A2.MONTH6_FORMAT is null)))
              and   ((A1.MONTH6_PERF = A2.MONTH6_PERF) or ((A1.MONTH6_PERF is null) and (A2.MONTH6_PERF is null)))
              and   ((A1.MONTH6_PERF_RAG = A2.MONTH6_PERF_RAG) or ((A1.MONTH6_PERF_RAG is null) and (A2.MONTH6_PERF_RAG is null)))
              and   ((A1.QTD = A2.QTD) or ((A1.QTD is null) and (A2.QTD is null)))
              and   ((A1.QTD_FORMAT = A2.QTD_FORMAT) or ((A1.QTD_FORMAT is null) and (A2.QTD_FORMAT is null)))
              and   ((A1.QTD_PERF = A2.QTD_PERF) or ((A1.QTD_PERF is null) and (A2.QTD_PERF is null)))
              and   ((A1.QTD_PERF_RAG = A2.QTD_PERF_RAG) or ((A1.QTD_PERF_RAG is null) and (A2.QTD_PERF_RAG is null)))
              and   ((A1.HTD = A2.HTD) or ((A1.HTD is null) and (A2.HTD is null)))
              and   ((A1.HTD_FORMAT = A2.HTD_FORMAT) or ((A1.HTD_FORMAT is null) and (A2.HTD_FORMAT is null)))
              and   ((A1.HTD_PERF = A2.HTD_PERF) or ((A1.HTD_PERF is null) and (A2.HTD_PERF is null)))
              and   ((A1.HTD_PERF_RAG = A2.HTD_PERF_RAG) or ((A1.HTD_PERF_RAG is null) and (A2.HTD_PERF_RAG is null)))
              and   ((A1.YTD = A2.YTD) or ((A1.YTD is null) and (A2.YTD is null)))
              and   ((A1.YTD_FORMAT = A2.YTD_FORMAT) or ((A1.YTD_FORMAT is null) and (A2.YTD_FORMAT is null)))
              and   ((A1.YTD_PERF = A2.YTD_PERF) or ((A1.YTD_PERF is null) and (A2.YTD_PERF is null)))
              and   ((A1.YTD_PERF_RAG = A2.YTD_PERF_RAG) or ((A1.YTD_PERF_RAG is null) and (A2.YTD_PERF_RAG is null)))
              and   ((A1.PARENT_MEASURE_ID = A2.PARENT_MEASURE_ID) or ((A1.PARENT_MEASURE_ID is null) and (A2.PARENT_MEASURE_ID is null)))
              and   ((A1.MEASURE_TYPE = A2.MEASURE_TYPE) or ((A1.MEASURE_TYPE is null) and (A2.MEASURE_TYPE is null)))
              and   ((A1.MEASURE_GROUP = A2.MEASURE_GROUP) or ((A1.MEASURE_GROUP is null) and (A2.MEASURE_GROUP is null)))
              and   ((A1.PARENT_MEASURE_DESCRIPTION = A2.PARENT_MEASURE_DESCRIPTION) or ((A1.PARENT_MEASURE_DESCRIPTION is null) and (A2.PARENT_MEASURE_DESCRIPTION is null)))
              and   ((A1.LV2_FIVEWKAVG = A2.LV2_FIVEWKAVG) or ((A1.LV2_FIVEWKAVG is null) and (A2.LV2_FIVEWKAVG is null)))
              and   ((A1.LV2_FIVEWKAVG_FORMAT = A2.LV2_FIVEWKAVG_FORMAT) or ((A1.LV2_FIVEWKAVG_FORMAT is null) and (A2.LV2_FIVEWKAVG_FORMAT is null)))
              and   ((A1.LV2_FIVEWKAVG_PERF = A2.LV2_FIVEWKAVG_PERF) or ((A1.LV2_FIVEWKAVG_PERF is null) and (A2.LV2_FIVEWKAVG_PERF is null)))
              and   ((A1.LV2_FIVEWKAVG_PERF_RAG = A2.LV2_FIVEWKAVG_PERF_RAG) or ((A1.LV2_FIVEWKAVG_PERF_RAG is null) and (A2.LV2_FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.LV3_FIVEWKAVG = A2.LV3_FIVEWKAVG) or ((A1.LV3_FIVEWKAVG is null) and (A2.LV3_FIVEWKAVG is null)))
              and   ((A1.LV3_FIVEWKAVG_FORMAT = A2.LV3_FIVEWKAVG_FORMAT) or ((A1.LV3_FIVEWKAVG_FORMAT is null) and (A2.LV3_FIVEWKAVG_FORMAT is null)))
              and   ((A1.LV3_FIVEWKAVG_PERF = A2.LV3_FIVEWKAVG_PERF) or ((A1.LV3_FIVEWKAVG_PERF is null) and (A2.LV3_FIVEWKAVG_PERF is null)))
              and   ((A1.LV3_FIVEWKAVG_PERF_RAG = A2.LV3_FIVEWKAVG_PERF_RAG) or ((A1.LV3_FIVEWKAVG_PERF_RAG is null) and (A2.LV3_FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.LV4_FIVEWKAVG = A2.LV4_FIVEWKAVG) or ((A1.LV4_FIVEWKAVG is null) and (A2.LV4_FIVEWKAVG is null)))
              and   ((A1.LV4_FIVEWKAVG_FORMAT = A2.LV4_FIVEWKAVG_FORMAT) or ((A1.LV4_FIVEWKAVG_FORMAT is null) and (A2.LV4_FIVEWKAVG_FORMAT is null)))
              and   ((A1.LV4_FIVEWKAVG_PERF = A2.LV4_FIVEWKAVG_PERF) or ((A1.LV4_FIVEWKAVG_PERF is null) and (A2.LV4_FIVEWKAVG_PERF is null)))
              and   ((A1.LV4_FIVEWKAVG_PERF_RAG = A2.LV4_FIVEWKAVG_PERF_RAG) or ((A1.LV4_FIVEWKAVG_PERF_RAG is null) and (A2.LV4_FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.LV5_FIVEWKAVG = A2.LV5_FIVEWKAVG) or ((A1.LV5_FIVEWKAVG is null) and (A2.LV5_FIVEWKAVG is null)))
              and   ((A1.LV5_FIVEWKAVG_FORMAT = A2.LV5_FIVEWKAVG_FORMAT) or ((A1.LV5_FIVEWKAVG_FORMAT is null) and (A2.LV5_FIVEWKAVG_FORMAT is null)))
              and   ((A1.LV5_FIVEWKAVG_PERF = A2.LV5_FIVEWKAVG_PERF) or ((A1.LV5_FIVEWKAVG_PERF is null) and (A2.LV5_FIVEWKAVG_PERF is null)))
              and   ((A1.LV5_FIVEWKAVG_PERF_RAG = A2.LV5_FIVEWKAVG_PERF_RAG) or ((A1.LV5_FIVEWKAVG_PERF_RAG is null) and (A2.LV5_FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.LV6_FIVEWKAVG = A2.LV6_FIVEWKAVG) or ((A1.LV6_FIVEWKAVG is null) and (A2.LV6_FIVEWKAVG is null)))
              and   ((A1.LV6_FIVEWKAVG_FORMAT = A2.LV6_FIVEWKAVG_FORMAT) or ((A1.LV6_FIVEWKAVG_FORMAT is null) and (A2.LV6_FIVEWKAVG_FORMAT is null)))
              and   ((A1.LV6_FIVEWKAVG_PERF = A2.LV6_FIVEWKAVG_PERF) or ((A1.LV6_FIVEWKAVG_PERF is null) and (A2.LV6_FIVEWKAVG_PERF is null)))
              and   ((A1.LV6_FIVEWKAVG_PERF_RAG = A2.LV6_FIVEWKAVG_PERF_RAG) or ((A1.LV6_FIVEWKAVG_PERF_RAG is null) and (A2.LV6_FIVEWKAVG_PERF_RAG is null)))
              and   ((A1.LV2_QTD = A2.LV2_QTD) or ((A1.LV2_QTD is null) and (A2.LV2_QTD is null)))
              and   ((A1.LV2_QTD_FORMAT = A2.LV2_QTD_FORMAT) or ((A1.LV2_QTD_FORMAT is null) and (A2.LV2_QTD_FORMAT is null)))
              and   ((A1.LV2_QTD_PERF = A2.LV2_QTD_PERF) or ((A1.LV2_QTD_PERF is null) and (A2.LV2_QTD_PERF is null)))
              and   ((A1.LV2_QTD_PERF_RAG = A2.LV2_QTD_PERF_RAG) or ((A1.LV2_QTD_PERF_RAG is null) and (A2.LV2_QTD_PERF_RAG is null)))
              and   ((A1.LV3_QTD = A2.LV3_QTD) or ((A1.LV3_QTD is null) and (A2.LV3_QTD is null)))
              and   ((A1.LV3_QTD_FORMAT = A2.LV3_QTD_FORMAT) or ((A1.LV3_QTD_FORMAT is null) and (A2.LV3_QTD_FORMAT is null)))
              and   ((A1.LV3_QTD_PERF = A2.LV3_QTD_PERF) or ((A1.LV3_QTD_PERF is null) and (A2.LV3_QTD_PERF is null)))
              and   ((A1.LV3_QTD_PERF_RAG = A2.LV3_QTD_PERF_RAG) or ((A1.LV3_QTD_PERF_RAG is null) and (A2.LV3_QTD_PERF_RAG is null)))
              and   ((A1.LV4_QTD = A2.LV4_QTD) or ((A1.LV4_QTD is null) and (A2.LV4_QTD is null)))
              and   ((A1.LV4_QTD_FORMAT = A2.LV4_QTD_FORMAT) or ((A1.LV4_QTD_FORMAT is null) and (A2.LV4_QTD_FORMAT is null)))
              and   ((A1.LV4_QTD_PERF = A2.LV4_QTD_PERF) or ((A1.LV4_QTD_PERF is null) and (A2.LV4_QTD_PERF is null)))
              and   ((A1.LV4_QTD_PERF_RAG = A2.LV4_QTD_PERF_RAG) or ((A1.LV4_QTD_PERF_RAG is null) and (A2.LV4_QTD_PERF_RAG is null)))
              and   ((A1.LV5_QTD = A2.LV5_QTD) or ((A1.LV5_QTD is null) and (A2.LV5_QTD is null)))
              and   ((A1.LV5_QTD_FORMAT = A2.LV5_QTD_FORMAT) or ((A1.LV5_QTD_FORMAT is null) and (A2.LV5_QTD_FORMAT is null)))
              and   ((A1.LV5_QTD_PERF = A2.LV5_QTD_PERF) or ((A1.LV5_QTD_PERF is null) and (A2.LV5_QTD_PERF is null)))
              and   ((A1.LV5_QTD_PERF_RAG = A2.LV5_QTD_PERF_RAG) or ((A1.LV5_QTD_PERF_RAG is null) and (A2.LV5_QTD_PERF_RAG is null)))
              and   ((A1.LV6_QTD = A2.LV6_QTD) or ((A1.LV6_QTD is null) and (A2.LV6_QTD is null)))
              and   ((A1.LV6_QTD_FORMAT = A2.LV6_QTD_FORMAT) or ((A1.LV6_QTD_FORMAT is null) and (A2.LV6_QTD_FORMAT is null)))
              and   ((A1.LV6_QTD_PERF = A2.LV6_QTD_PERF) or ((A1.LV6_QTD_PERF is null) and (A2.LV6_QTD_PERF is null)))
              and   ((A1.LV6_QTD_PERF_RAG = A2.LV6_QTD_PERF_RAG) or ((A1.LV6_QTD_PERF_RAG is null) and (A2.LV6_QTD_PERF_RAG is null)))
              and   ((A1.LV2_HTD = A2.LV2_HTD) or ((A1.LV2_HTD is null) and (A2.LV2_HTD is null)))
              and   ((A1.LV2_HTD_FORMAT = A2.LV2_HTD_FORMAT) or ((A1.LV2_HTD_FORMAT is null) and (A2.LV2_HTD_FORMAT is null)))
              and   ((A1.LV2_HTD_PERF = A2.LV2_HTD_PERF) or ((A1.LV2_HTD_PERF is null) and (A2.LV2_HTD_PERF is null)))
              and   ((A1.LV2_HTD_PERF_RAG = A2.LV2_HTD_PERF_RAG) or ((A1.LV2_HTD_PERF_RAG is null) and (A2.LV2_HTD_PERF_RAG is null)))
              and   ((A1.LV3_HTD = A2.LV3_HTD) or ((A1.LV3_HTD is null) and (A2.LV3_HTD is null)))
              and   ((A1.LV3_HTD_FORMAT = A2.LV3_HTD_FORMAT) or ((A1.LV3_HTD_FORMAT is null) and (A2.LV3_HTD_FORMAT is null)))
              and   ((A1.LV3_HTD_PERF = A2.LV3_HTD_PERF) or ((A1.LV3_HTD_PERF is null) and (A2.LV3_HTD_PERF is null)))
              and   ((A1.LV3_HTD_PERF_RAG = A2.LV3_HTD_PERF_RAG) or ((A1.LV3_HTD_PERF_RAG is null) and (A2.LV3_HTD_PERF_RAG is null)))
              and   ((A1.LV4_HTD = A2.LV4_HTD) or ((A1.LV4_HTD is null) and (A2.LV4_HTD is null)))
              and   ((A1.LV4_HTD_FORMAT = A2.LV4_HTD_FORMAT) or ((A1.LV4_HTD_FORMAT is null) and (A2.LV4_HTD_FORMAT is null)))
              and   ((A1.LV4_HTD_PERF = A2.LV4_HTD_PERF) or ((A1.LV4_HTD_PERF is null) and (A2.LV4_HTD_PERF is null)))
              and   ((A1.LV4_HTD_PERF_RAG = A2.LV4_HTD_PERF_RAG) or ((A1.LV4_HTD_PERF_RAG is null) and (A2.LV4_HTD_PERF_RAG is null)))
              and   ((A1.LV5_HTD = A2.LV5_HTD) or ((A1.LV5_HTD is null) and (A2.LV5_HTD is null)))
              and   ((A1.LV5_HTD_FORMAT = A2.LV5_HTD_FORMAT) or ((A1.LV5_HTD_FORMAT is null) and (A2.LV5_HTD_FORMAT is null)))
              and   ((A1.LV5_HTD_PERF = A2.LV5_HTD_PERF) or ((A1.LV5_HTD_PERF is null) and (A2.LV5_HTD_PERF is null)))
              and   ((A1.LV5_HTD_PERF_RAG = A2.LV5_HTD_PERF_RAG) or ((A1.LV5_HTD_PERF_RAG is null) and (A2.LV5_HTD_PERF_RAG is null)))
              and   ((A1.LV6_HTD = A2.LV6_HTD) or ((A1.LV6_HTD is null) and (A2.LV6_HTD is null)))
              and   ((A1.LV6_HTD_FORMAT = A2.LV6_HTD_FORMAT) or ((A1.LV6_HTD_FORMAT is null) and (A2.LV6_HTD_FORMAT is null)))
              and   ((A1.LV6_HTD_PERF = A2.LV6_HTD_PERF) or ((A1.LV6_HTD_PERF is null) and (A2.LV6_HTD_PERF is null)))
              and   ((A1.LV6_HTD_PERF_RAG = A2.LV6_HTD_PERF_RAG) or ((A1.LV6_HTD_PERF_RAG is null) and (A2.LV6_HTD_PERF_RAG is null)))
              and   ((A1.LV2_YTD = A2.LV2_YTD) or ((A1.LV2_YTD is null) and (A2.LV2_YTD is null)))
              and   ((A1.LV2_YTD_FORMAT = A2.LV2_YTD_FORMAT) or ((A1.LV2_YTD_FORMAT is null) and (A2.LV2_YTD_FORMAT is null)))
              and   ((A1.LV2_YTD_PERF = A2.LV2_YTD_PERF) or ((A1.LV2_YTD_PERF is null) and (A2.LV2_YTD_PERF is null)))
              and   ((A1.LV2_YTD_PERF_RAG = A2.LV2_YTD_PERF_RAG) or ((A1.LV2_YTD_PERF_RAG is null) and (A2.LV2_YTD_PERF_RAG is null)))
              and   ((A1.LV3_YTD = A2.LV3_YTD) or ((A1.LV3_YTD is null) and (A2.LV3_YTD is null)))
              and   ((A1.LV3_YTD_FORMAT = A2.LV3_YTD_FORMAT) or ((A1.LV3_YTD_FORMAT is null) and (A2.LV3_YTD_FORMAT is null)))
              and   ((A1.LV3_YTD_PERF = A2.LV3_YTD_PERF) or ((A1.LV3_YTD_PERF is null) and (A2.LV3_YTD_PERF is null)))
              and   ((A1.LV3_YTD_PERF_RAG = A2.LV3_YTD_PERF_RAG) or ((A1.LV3_YTD_PERF_RAG is null) and (A2.LV3_YTD_PERF_RAG is null)))
              and   ((A1.LV4_YTD = A2.LV4_YTD) or ((A1.LV4_YTD is null) and (A2.LV4_YTD is null)))
              and   ((A1.LV4_YTD_FORMAT = A2.LV4_YTD_FORMAT) or ((A1.LV4_YTD_FORMAT is null) and (A2.LV4_YTD_FORMAT is null)))
              and   ((A1.LV4_YTD_PERF = A2.LV4_YTD_PERF) or ((A1.LV4_YTD_PERF is null) and (A2.LV4_YTD_PERF is null)))
              and   ((A1.LV4_YTD_PERF_RAG = A2.LV4_YTD_PERF_RAG) or ((A1.LV4_YTD_PERF_RAG is null) and (A2.LV4_YTD_PERF_RAG is null)))
              and   ((A1.LV5_YTD = A2.LV5_YTD) or ((A1.LV5_YTD is null) and (A2.LV5_YTD is null)))
              and   ((A1.LV5_YTD_FORMAT = A2.LV5_YTD_FORMAT) or ((A1.LV5_YTD_FORMAT is null) and (A2.LV5_YTD_FORMAT is null)))
              and   ((A1.LV5_YTD_PERF = A2.LV5_YTD_PERF) or ((A1.LV5_YTD_PERF is null) and (A2.LV5_YTD_PERF is null)))
              and   ((A1.LV5_YTD_PERF_RAG = A2.LV5_YTD_PERF_RAG) or ((A1.LV5_YTD_PERF_RAG is null) and (A2.LV5_YTD_PERF_RAG is null)))
              and   ((A1.LV6_YTD = A2.LV6_YTD) or ((A1.LV6_YTD is null) and (A2.LV6_YTD is null)))
              and   ((A1.LV6_YTD_FORMAT = A2.LV6_YTD_FORMAT) or ((A1.LV6_YTD_FORMAT is null) and (A2.LV6_YTD_FORMAT is null)))
              and   ((A1.LV6_YTD_PERF = A2.LV6_YTD_PERF) or ((A1.LV6_YTD_PERF is null) and (A2.LV6_YTD_PERF is null)))
              and   ((A1.LV6_YTD_PERF_RAG = A2.LV6_YTD_PERF_RAG) or ((A1.LV6_YTD_PERF_RAG is null) and (A2.LV6_YTD_PERF_RAG is null)))
              and   ((A1.DIF_FROM_PEER_FIVEWKAVG = A2.DIF_FROM_PEER_FIVEWKAVG) or ((A1.DIF_FROM_PEER_FIVEWKAVG is null) and (A2.DIF_FROM_PEER_FIVEWKAVG is null)))
              and   ((A1.DIF_FROM_PEER_FIVEWKAVG_FORMAT = A2.DIF_FROM_PEER_FIVEWKAVG_FORMAT) or ((A1.DIF_FROM_PEER_FIVEWKAVG_FORMAT is null) and (A2.DIF_FROM_PEER_FIVEWKAVG_FORMAT is null)))
              and   ((A1.DIF_FROM_PEER_FIVEWKAVG_PERF = A2.DIF_FROM_PEER_FIVEWKAVG_PERF) or ((A1.DIF_FROM_PEER_FIVEWKAVG_PERF is null) and (A2.DIF_FROM_PEER_FIVEWKAVG_PERF is null)))
              and   ((A1.DIF_FROM_PEER_FIVEWK_PERF_RAG = A2.DIF_FROM_PEER_FIVEWK_PERF_RAG) or ((A1.DIF_FROM_PEER_FIVEWK_PERF_RAG is null) and (A2.DIF_FROM_PEER_FIVEWK_PERF_RAG is null)))
              and   ((A1.DIF_FROM_PEER_QTD = A2.DIF_FROM_PEER_QTD) or ((A1.DIF_FROM_PEER_QTD is null) and (A2.DIF_FROM_PEER_QTD is null)))
              and   ((A1.DIF_FROM_PEER_QTD_FORMAT = A2.DIF_FROM_PEER_QTD_FORMAT) or ((A1.DIF_FROM_PEER_QTD_FORMAT is null) and (A2.DIF_FROM_PEER_QTD_FORMAT is null)))
              and   ((A1.DIF_FROM_PEER_QTD_PERF = A2.DIF_FROM_PEER_QTD_PERF) or ((A1.DIF_FROM_PEER_QTD_PERF is null) and (A2.DIF_FROM_PEER_QTD_PERF is null)))
              and   ((A1.DIF_FROM_PEER_QTD_PERF_RAG = A2.DIF_FROM_PEER_QTD_PERF_RAG) or ((A1.DIF_FROM_PEER_QTD_PERF_RAG is null) and (A2.DIF_FROM_PEER_QTD_PERF_RAG is null)))
              and   ((A1.DIF_FROM_PEER_HTD = A2.DIF_FROM_PEER_HTD) or ((A1.DIF_FROM_PEER_HTD is null) and (A2.DIF_FROM_PEER_HTD is null)))
              and   ((A1.DIF_FROM_PEER_HTD_FORMAT = A2.DIF_FROM_PEER_HTD_FORMAT) or ((A1.DIF_FROM_PEER_HTD_FORMAT is null) and (A2.DIF_FROM_PEER_HTD_FORMAT is null)))
              and   ((A1.DIF_FROM_PEER_HTD_PERF = A2.DIF_FROM_PEER_HTD_PERF) or ((A1.DIF_FROM_PEER_HTD_PERF is null) and (A2.DIF_FROM_PEER_HTD_PERF is null)))
              and   ((A1.DIF_FROM_PEER_HTD_PERF_RAG = A2.DIF_FROM_PEER_HTD_PERF_RAG) or ((A1.DIF_FROM_PEER_HTD_PERF_RAG is null) and (A2.DIF_FROM_PEER_HTD_PERF_RAG is null)))
              and   ((A1.DIF_FROM_PEER_YTD = A2.DIF_FROM_PEER_YTD) or ((A1.DIF_FROM_PEER_YTD is null) and (A2.DIF_FROM_PEER_YTD is null)))
              and   ((A1.DIF_FROM_PEER_YTD_FORMAT = A2.DIF_FROM_PEER_YTD_FORMAT) or ((A1.DIF_FROM_PEER_YTD_FORMAT is null) and (A2.DIF_FROM_PEER_YTD_FORMAT is null)))
              and   ((A1.DIF_FROM_PEER_YTD_PERF = A2.DIF_FROM_PEER_YTD_PERF) or ((A1.DIF_FROM_PEER_YTD_PERF is null) and (A2.DIF_FROM_PEER_YTD_PERF is null)))
              and   ((A1.DIF_FROM_PEER_YTD_PERF_RAG = A2.DIF_FROM_PEER_YTD_PERF_RAG) or ((A1.DIF_FROM_PEER_YTD_PERF_RAG is null) and (A2.DIF_FROM_PEER_YTD_PERF_RAG is null))))

但它绝对是永远不会完成的,我现在取消了它,希望有人能找到一种更快的方法,如果可能的话。

作为参考,它包含大约130万行,其中恰好有一半是重复的。

谢谢。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38307022

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档