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. HDU_2043——判断密码是否安全

    Problem Description 网上流传一句话:"常在网上飘啊,哪能不挨刀啊-".其实要想能安安心心地上网其实也不难,学点安全知识就可以.首先,我们就要设置一个安全的密码. ...

  2. HDU-2059龟兔赛跑(基础方程DP-遍历之前的所有状态)

    Problem Description 据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能 ...

  3. 【Ruby on Rails 学习一】ubuntu14.04配置rvm与ruby

    要安装ruby,首先要安装rvm,借助rvm安装ruby rvm 的全称是 Ruby Version Manager ,是一款由 Wayne E. Seguin  开发的一款命令行工具.rvm 能够让 ...

  4. Solr初步学习

    Solr采用Lucene搜索库为核心,提供全文索引和搜索开源企业平台,提供REST的HTTP/XML和JSON的API,如果你是Solr新手,那么就和我一起来入门吧!本教程以solr4.8作为测试环境 ...

  5. (转)iOS5:[UIDevice uniqueIdentifier]的替代方案

    背景: 大多数应用都会用到苹果设备的UDID号,UDID通常有以下两种用途: 1)用于一些统计与分析目的:[第三方统计工具如友盟,广告商如ADMOB等] 2)将UDID作为用户ID来唯一识别用户,省去 ...

  6. Redis Install

    Redis 是一个高性能的key-value数据库. redis的出现,很大程度补偿了memcached这类keyvalue存储的不足,在部分场合可以对关系数据库起到很好的补充作用.它提供了Pytho ...

  7. HDU 1015 Safecracker 解决问题的方法

    Problem Description === Op tech briefing, 2002/11/02 06:42 CST ===  "The item is locked in a Kl ...

  8. NUnit单元测试初试

    创建项目,创建几个方法 创建测试类 开启NUnit测试工具,新建一个测试项目 打开测试的程序集 选择节点,点击测试,绿色通过,红色说明有错误

  9. SqlServer 数据库进行定时自动的执行脚本

    需求:数据库进行自动执行脚本操作,有些数据库操作就不需要写程序来定时执行,完全可以交给我们SqlServer客户端代理来做,下面的步骤,我是结合前一篇文章的SqlServer不同服务器数据库之间数据传 ...

  10. C#多线程实践——创建和开始使用

    线程用Thread类来创建, 通过ThreadStart委托来指明方法从哪里开始运行.ThreadStart的声明如下: public delegate void ThreadStart(); 调用S ...