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. AES的S-BOX构造

    利用GF(2^8)乘法逆元,以及矩阵运算,可以构造出AES的SBOX. 求乘法逆元的一般方法是利用扩展欧几里得定理,在这里我取了个巧. 因为我已经有了GF的指数表(见上一篇文),利用指数表可以轻易地构 ...

  2. go语言的安装和配置,以及包引用

    1.下载和安装 首先大家可以去官网下载 http://golang.org/dl/ 如果官网你看不懂的话,可以到这里下载: http://golangtc.com/download ,这里也提供了百度 ...

  3. Jmeter接口测试-badboy录制脚本(二)

    1.脚本录制,采用badboy进行录制,操作步骤很简单 2.badboy简介: Badboy是一款免费WEB自动化测试工具. 官方下载地址:http://www.badboy.com.au badbo ...

  4. linux-Python升级安装

    Wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz tar zxvf Python-3.5.0.tar.gz && ...

  5. rpm包安装

    RPM全称是“RedHatPackageManager”是由RedHat公司发发展起来的,本质是将软件源码包经过编译并且打包成rpm的格式,rpm文件包含的有二进制文件,配置文件,库文件等,同时RPM ...

  6. Java 二维码生成工具类

    /** * 二维码 工具 * * @author Rubekid * */ public class QRcodeUtils { /** * 默认version */ public static fi ...

  7. pd的django To do list 教程------(1)说明与展示

    1:开发环境:windows7+django1.8+Python2.7+mysql数据库 2:开发工具:pycharm 3:说明与展示 以上就是最后的页面,可以完成添加,删除,编辑,已完成(勾选che ...

  8. 页面传值中get和post区别

    get是把参数数据队列加到提交表单的ACTION属性所指的URL中,值和表单内各个字段一一对应. post是通过HTTP post机制,将表单内各个字段与其内容放置在HTML HEADER内一起传送到 ...

  9. 发布到IIS后 程序乱码

    网站-功能视图-.net全球化 编码设置 请求:utf-8 文件:gb2312 响应:utf-8 响应头:utf-8 可以根据需要自己定义

  10. Android-为何以及如何保存Fragment实例

    在安卓开发中,由于旋转设备会造成配置改变进而导致Activity实例被摧毁(当然也包括Activity托管的Fragment).Activity或Fragment实例被摧毁自然也就让Model被摧毁, ...