SELECT *
FROM F_PTY_INDIV_TMP O
WHERE EXISTS
(SELECT 1
FROM F_PTY_INDIV F
WHERE O.PTY_ID = F.PTY_ID
AND O.CORP_ORG = F.CORP_ORG
AND O.SOURCE_CODE = F.SOURCE_CODE)
AND O.PTY_NAME || O.GENDER_CD || O.BIRTHDAY || O.CERT_TYPE ||
O.CERT_NO || O.SOCINSUR_NO || O.COUNTRY_CD || O.NATION ||
O.POLITICS_CD || O.MARRIAGE_STAT || O.FAMILY_ADDR || O.CUST_NAME ||
O.VOCATION_CD || O.TITLE_CD || O.TOPEDU_CD || O.TOP_DEGREE_CD ||
O.FINANCE_OR_NOT || O.OWNBANK_FLAG || O.INPUT_ORG || O.ADDRESS ||
O.DUTY_CD || O.LIVESTAT_CD || O.FARMERFLAG2 || O.CORP_BUS_CLASS ||
O.RELATIVEFLAG || O.COUNTRYCODE || O.REGION || O.CERT_PUT_DATE ||
O.CERT_END_DATE NOT IN
(SELECT PTY_NAME || GENDER_CD || BIRTHDAY || CERT_TYPE || CERT_NO ||
SOCINSUR_NO || COUNTRY_CD || NATION || POLITICS_CD ||
MARRIAGE_STAT || FAMILY_ADDR || CUST_NAME || VOCATION_CD ||
TITLE_CD || TOPEDU_CD || TOP_DEGREE_CD || FINANCE_OR_NOT ||
OWNBANK_FLAG || INPUT_ORG || ADDRESS || DUTY_CD ||
LIVESTAT_CD || FARMERFLAG2 || CORP_BUS_CLASS ||
RELATIVEFLAG || COUNTRYCODE || REGION || CERT_PUT_DATE ||
CERT_END_DATE
FROM F_PTY_INDIV
WHERE END_DT = TO_DATE('29991231', 'YYYY-MM-DD')
AND O.PTY_ID = PTY_ID
AND O.CORP_ORG = CORP_ORG
AND O.SOURCE_CODE = SOURCE_CODE) Plan hash value: 3266576070 --------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 149K| 36M| | 115M (1)|385:19:18 |
|* 1 | FILTER | | | | | | |
|* 2 | HASH JOIN RIGHT SEMI | | 149K| 36M| 20M| 4683 (1)| 00:00:57 |
| 3 | INDEX FAST FULL SCAN | SYS_C0061953 | 541K| 13M| | 811 (1)| 00:00:10 |
| 4 | TABLE ACCESS FULL | F_PTY_INDIV_TMP | 149K| 32M| | 1176 (2)| 00:00:15 |
|* 5 | TABLE ACCESS BY INDEX ROWID| F_PTY_INDIV | 1 | 144 | | 775 (0)| 00:00:10 |
|* 6 | INDEX SKIP SCAN | SYS_C0061953 | 1 | | | 774 (0)| 00:00:10 |
-------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id):
--------------------------------------------------- 1 - filter( NOT EXISTS (SELECT 0 FROM "F_PTY_INDIV" "F_PTY_INDIV" WHERE
"END_DT"=TO_DATE('29991231','YYYY-MM-DD') AND LNNVL(:B1||:B2||:B3||:B4||:B5||:B6||:B7||:B8||:B9|
|:B10||:B11||:B12||:B13||:B14||:B15||:B16||:B17||:B18||:B19||:B20||:B21||:B22||:B23||:B24||:B25|
|:B26||:B27||:B28||:B29<>"PTY_NAME"||"GENDER_CD"||INTERNAL_FUNCTION("BIRTHDAY")||"CERT_TYPE"||"C
ERT_NO"||"SOCINSUR_NO"||"COUNTRY_CD"||"NATION"||"POLITICS_CD"||"MARRIAGE_STAT"||"FAMILY_ADDR"||"
CUST_NAME"||"VOCATION_CD"||"TITLE_CD"||"TOPEDU_CD"||"TOP_DEGREE_CD"||"FINANCE_OR_NOT"||"OWNBANK_
FLAG"||"INPUT_ORG"||"ADDRESS"||"DUTY_CD"||"LIVESTAT_CD"||"FARMERFLAG2"||"CORP_BUS_CLASS"||"RELAT
IVEFLAG"||"COUNTRYCODE"||"REGION"||"CERT_PUT_DATE"||"CERT_END_DATE") AND "PTY_ID"=:B30 AND
"CORP_ORG"=:B31 AND "SOURCE_CODE"=:B32))
2 - access("O"."PTY_ID"="F"."PTY_ID" AND "O"."CORP_ORG"="F"."CORP_ORG" AND
"O"."SOURCE_CODE"="F"."SOURCE_CODE")
5 - filter("END_DT"=TO_DATE('29991231','YYYY-MM-DD') AND
LNNVL(:B1||:B2||:B3||:B4||:B5||:B6||:B7||:B8||:B9||:B10||:B11||:B12||:B13||:B14||:B15||:B16||:B1
7||:B18||:B19||:B20||:B21||:B22||:B23||:B24||:B25||:B26||:B27||:B28||:B29<>"PTY_NAME"||"GENDER_C
D"||INTERNAL_FUNCTION("BIRTHDAY")||"CERT_TYPE"||"CERT_NO"||"SOCINSUR_NO"||"COUNTRY_CD"||"NATION"
||"POLITICS_CD"||"MARRIAGE_STAT"||"FAMILY_ADDR"||"CUST_NAME"||"VOCATION_CD"||"TITLE_CD"||"TOPEDU
_CD"||"TOP_DEGREE_CD"||"FINANCE_OR_NOT"||"OWNBANK_FLAG"||"INPUT_ORG"||"ADDRESS"||"DUTY_CD"||"LIV
ESTAT_CD"||"FARMERFLAG2"||"CORP_BUS_CLASS"||"RELATIVEFLAG"||"COUNTRYCODE"||"REGION"||"CERT_PUT_D
ATE"||"CERT_END_DATE"))
6 - access("PTY_ID"=:B1 AND "SOURCE_CODE"=:B2 AND "CORP_ORG"=:B3)
filter("PTY_ID"=:B1 AND "CORP_ORG"=:B2 AND "SOURCE_CODE"=:B3) 可以看到在:
AND O.PTY_NAME || O.GENDER_CD || O.BIRTHDAY || O.CERT_TYPE ||
O.CERT_NO || O.SOCINSUR_NO || O.COUNTRY_CD || O.NATION ||
O.POLITICS_CD || O.MARRIAGE_STAT || O.FAMILY_ADDR || O.CUST_NAME ||
O.VOCATION_CD || O.TITLE_CD || O.TOPEDU_CD || O.TOP_DEGREE_CD ||
O.FINANCE_OR_NOT || O.OWNBANK_FLAG || O.INPUT_ORG || O.ADDRESS ||
O.DUTY_CD || O.LIVESTAT_CD || O.FARMERFLAG2 || O.CORP_BUS_CLASS ||
O.RELATIVEFLAG || O.COUNTRYCODE || O.REGION || O.CERT_PUT_DATE ||
O.CERT_END_DATE NOT IN
(SELECT PTY_NAME || GENDER_CD || BIRTHDAY || CERT_TYPE || CERT_NO ||
SOCINSUR_NO || COUNTRY_CD || NATION || POLITICS_CD ||
MARRIAGE_STAT || FAMILY_ADDR || CUST_NAME || VOCATION_CD ||
TITLE_CD || TOPEDU_CD || TOP_DEGREE_CD || FINANCE_OR_NOT ||
OWNBANK_FLAG || INPUT_ORG || ADDRESS || DUTY_CD ||
LIVESTAT_CD || FARMERFLAG2 || CORP_BUS_CLASS ||
RELATIVEFLAG || COUNTRYCODE || REGION || CERT_PUT_DATE ||
CERT_END_DATE
FROM F_PTY_INDIV
WHERE END_DT = TO_DATE('29991231', 'YYYY-MM-DD')
AND O.PTY_ID = PTY_ID
AND O.CORP_ORG = CORP_ORG
AND O.SOURCE_CODE = SOURCE_CODE) 这里没有展开,哪里没展开就改哪里。
select * FROM F_PTY_INDIV_TMP O
left join (SELECT PTY_ID,CORP_ORG,SOURCE_CODE, PTY_NAME || GENDER_CD || BIRTHDAY || CERT_TYPE || CERT_NO ||
SOCINSUR_NO || COUNTRY_CD || NATION || POLITICS_CD ||
MARRIAGE_STAT || FAMILY_ADDR || CUST_NAME || VOCATION_CD ||
TITLE_CD || TOPEDU_CD || TOP_DEGREE_CD || FINANCE_OR_NOT ||
OWNBANK_FLAG || INPUT_ORG || ADDRESS || DUTY_CD ||
LIVESTAT_CD || FARMERFLAG2 || CORP_BUS_CLASS ||
RELATIVEFLAG || COUNTRYCODE || REGION || CERT_PUT_DATE ||
CERT_END_DATE as s
FROM F_PTY_INDIV
WHERE END_DT = TO_DATE('29991231', 'YYYY-MM-DD') b
on (O.PTY_ID = b.PTY_ID
AND O.CORP_ORG = b.CORP_ORG
AND O.SOURCE_CODE = b.SOURCE_CODE and (O.PTY_NAME || O.GENDER_CD || O.BIRTHDAY || O.CERT_TYPE ||
O.CERT_NO || O.SOCINSUR_NO || O.COUNTRY_CD || O.NATION ||
O.POLITICS_CD || O.MARRIAGE_STAT || O.FAMILY_ADDR || O.CUST_NAME ||
O.VOCATION_CD || O.TITLE_CD || O.TOPEDU_CD || O.TOP_DEGREE_CD ||
O.FINANCE_OR_NOT || O.OWNBANK_FLAG || O.INPUT_ORG || O.ADDRESS ||
O.DUTY_CD || O.LIVESTAT_CD || O.FARMERFLAG2 || O.CORP_BUS_CLASS ||
O.RELATIVEFLAG || O.COUNTRYCODE || O.REGION || O.CERT_PUT_DATE ||
O.CERT_END_DATE) = b.s)
WHERE EXISTS
(SELECT 1
FROM F_PTY_INDIV F
WHERE O.PTY_ID = F.PTY_ID
AND O.CORP_ORG = F.CORP_ORG
AND O.SOURCE_CODE = F.SOURCE_CODE)
AND b.PTY_ID is null

FILTER 哪里没展开改哪里的更多相关文章

  1. php实现Bloom Filter

    Bloom Filter(BF) 是由Bloom在1970年提出的一种多哈希函数映射的高速查找算法,用于高速查找某个元素是否属于集合, 但不要求百分百的准确率. Bloom filter通经常使用于爬 ...

  2. Bloom Filter算法

    Bloom Filter算法详解 什么是布隆过滤器 布隆过滤器(Bloom Filter)是 1970 年由布隆提出的.它实际上是一个很长的二进制向量和一系列随机映射函数 (下面详细说),实际上你也可 ...

  3. android 伸缩控件ExpandableListView 展开失败的可能原因。

    (原创)转载请声明出处http://www.cnblogs.com/linguanh/ 问题原型: ExpandableListView 展开失效. --------------------直接看结论 ...

  4. BloomFilter 与 Cuckoo Filter

    BloomFilter 与 CuckooFilter Bloom Filter 原理 Bloom Filter是一种空间效率很高的随机数据结构,它的原理是,当一个元素被加入集合时,通过K个相互独立的H ...

  5. Filter and servlet

    filter与servlet的区别与联系呢? 1. Filter    实现javax.servlet.Filter接口,在web.xml中配置与标签指定使用哪个Filter实现类过滤哪些URL链接. ...

  6. Filter查询

    Filter查询 filter是不计算相关性的,同时可以cache,因此,filter速度要块于query 数据准备 POST /lib3/user/_bulk{"index":{ ...

  7. Filter与Servlet的区别与联系

    Filter与Servlet的区别与联系 转自 http://blog.csdn.net/gaibian0823/article/details/51027495 在我们写代码时,在web.xml中总 ...

  8. servlet与filter的加载顺序详解

     项目:3个filter,3个servlet,匹配的url路径/hello. 情况1:servlet没加<load-on-startup></load-on-startup>情 ...

  9. Hbase Filter之FilterList

    作者:Syn良子 出处:http://www.cnblogs.com/cssdongl/p/7098138.html 转载请注明出处 我们知道Hbase的Scan经常需要用到filter来过滤表中的数 ...

随机推荐

  1. BZOJ2038: [2009国家集训队]小Z的袜子(hose) -- 莫队算法 ,,分块

    2038: [2009国家集训队]小Z的袜子(hose) Time Limit: 20 Sec  Memory Limit: 259 MBSubmit: 3577  Solved: 1652[Subm ...

  2. java与数据结构(2)---java实现静态链表

    结点类 1 //结点类 2 class Node<T> { 3 private T data; 4 private int cursor; 5 6 Node(T data, int cur ...

  3. 当程序遇到 throw后的处理

    不管你在何处throw出一个exception,后面的代码便不会执行,它会去匹配本层代码中是否有相应的catch语句来捕捉,如果有,则进入此catch块,执行其中的代码.这样这次异常算是处理完了,如果 ...

  4. hadoop2.2.0的ha分布式集群搭建

    hadoop2.2.0 ha集群搭建 使用的文件如下:    jdk-6u45-linux-x64.bin    hadoop-2.2.0.x86_64.tar    zookeeper-3.4.5. ...

  5. java笔记3之赋值运算符

    赋值运算符:        基本的赋值运算符:=            把=右边的数据赋值给左边.          扩展的赋值运算符:+=,-=,*=,/=,%=            += 把左边 ...

  6. Windows下oracle打补丁步骤

    1.Oracle官网下载对应的补丁文件(需要oracle支持账号才能下载) 2.设置ORACLE_HOME set oracle_home=F:\oracle\product\11.2.0\dbhom ...

  7. UINavigation push 于 present到另一个页面详解

    如果页面中没有导航栏,可以present到这个A页面,在A页面想要跳转到有个有导航栏的页面就需要添加给B页面添加一个UINavigationController 然后present到B页面,代码如下 ...

  8. 屏幕分辨率(QQVGA、QVGA、VGA、XGA、WXGA、WUXGA和WSXGA+)

    TFT屏幕 TFT ( Thin Film Transistor 薄膜晶体管) ,是有源矩阵类型液晶显示器(AM-LCD)中的一种,TFT在液晶的背部设置特殊光管,能够“主动的”对屏幕上的各个独立的象 ...

  9. C# Tips:获得当前登录计算机的用户(本地用户/域用户)

    须要using的namespace: using System.Security.Principal; 获得登录计算机的用户: WindowsIdentity windowsIdentity = Wi ...

  10. Foreach语法

    先看例子: Random rand = new Random(47); float f[] = new float[10]; for(int i = 0; i < 10; i++){ f[i] ...