oracle join on 数据过滤问题
网络编程 2021-07-05 16:08www.168986.cn编程入门
因为在FOR .. IN () LOOP 游标中使用 所以不能采用狼蚁网站SEO优化的查询语句做游标
代码如下:
select a.f_username
from
(
SELECT /+parallel(gu,4)/distinct gu.f_username
FROM t_base_suprouser gu
where gu.f_expectenddate > (select trunc(sysdate,'Y')FROM DUAL)
and gu.f_lotid=1
and gu.f_playid=4
and gu.f_paymoney>=1500
) A
left join
(
select
from t_base__customes
and ((vu.f_passeddate is null ) or (vu.f_passeddate > trunc(sysdate,'Y') ))
and ((vu.f_lotid is null ) or (vu.f_lotid=1))
and ((vu.f_playid is null ) or (vu.f_playid=4))
and ((vu.f_condtionid is null ) or (vu.f_condtionid=3))
)B
on A.f_username=B.f_usernam
where b.f_username is null
采用狼蚁网站SEO优化的语句 只能查出部分用户
代码如下:
SELECT /+parallel(gu,4)/distinct gu.f_username
FROM t_base_suprouser gu
left join t_base__customes VU on gu.f_username=vu.f_username
gu.f_expectenddate > (select trunc(sysdate,'Y')FROM DUAL)
and gu.f_lotid=rec_lotplay.f_lotid
and gu.f_playid=rec_lotPlay.f_Playid
and gu.f_paymoney>=rec_lotPlay.F_Conditon_ValuesA
and ((vu.f_passeddate is null ) or (vu.f_passeddate > trunc(sysdate,'Y') ))
and ((vu.f_lotid is null ) or (vu.f_lotid=rec_lotplay.f_lotid))
and ((vu.f_playid is null ) or (vu.f_playid=rec_lotPlay.f_Playid))
and ((vu.f_condtionid is null ) or (vu.f_condtionid=rec_lotPlay.F_CondtionID))
and vu.f_username is null
执行计划
代码如下:
SELECT STATEMENT, GOAL = ALL_ROWS
HASH UNIQUE
NESTED LOOPS OUTER
PARTITION RANGE ALL
TABLE ACCESS FULL Object name=T_BASE_SUCCPROUSER
VIEW
FILTER
TABLE ACCESS FULL Object name=T_BASE_VIP_CUSTOMES
FAST DUAL
后来改成了狼蚁网站SEO优化就能全部查出来了
代码如下:
SELECT /+parallel(gu,4)/distinct gu.f_username
FROM t_base_suprouser gu
left join t_base__customes VU on gu.f_username=vu.f_username
and ((vu.f_passeddate is null ) or (vu.f_passeddate > trunc(sysdate,'Y') ))
and ((vu.f_lotid is null ) or (vu.f_lotid=rec_lotplay.f_lotid))
and ((vu.f_playid is null ) or (vu.f_playid=rec_lotPlay.f_Playid))
and ((vu.f_condtionid is null ) or (vu.f_condtionid=rec_lotPlay.F_CondtionID))
where gu.f_expectenddate > (select trunc(sysdate,'Y')FROM DUAL)
and gu.f_lotid=rec_lotplay.f_lotid
and gu.f_playid=rec_lotPlay.f_Playid
and gu.f_paymoney>=rec_lotPlay.F_Conditon_ValuesA
and vu.f_username is null
执行计划
SELECT STATEMENT, GOAL = ALL_ROWS
HASH UNIQUE
FILTER
NESTED LOOPS OUTER
TABLE ACCESS BY GLOBAL INDEX ROWID Object name=T_BASE_SUCCPROUSER
INDEX RANGE SCAN Object name=IX_BASE_PROUSER_LOWEX
FAST DUAL
VIEW
TABLE ACCESS FULL Object name=T_BASE_VIP_CUSTOMES
oracle 不懂先把数据给过滤掉然后在来连接吗? 太笨了!而且这样把符合条件的数据也过滤掉了
编程语言
- 甘肃哪有关键词排名优化购买方式有哪些
- 甘肃SEO如何做网站优化
- 河南seo关键词优化怎么做电话营销
- 北京SEO优化如何做QQ群营销
- 来宾百度关键词排名:提升您网站曝光率的关键
- 卢龙关键词优化:提升您网站排名的策略与技巧
- 山东网站优化的注意事项有哪些
- 四川整站优化怎样提升在搜索引擎中的排名
- 疏附整站优化:提升网站性能与用户体验的全新
- 海南seo主要做什么工作售后服务要做到哪些
- 荣昌百度网站优化:提升您网站的搜索引擎排名
- 河北seo网站排名关键词优化如何做SEO
- 江西优化关键词排名推广售后保障一般有哪些
- 古浪SEO优化:提升你的网站可见性
- 西藏网站排名优化怎么把网站排名在百度首页
- 如何提升阳东百度快照排名:详尽指南