惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
C
Cisco Blogs
A
Arctic Wolf
月光博客
月光博客
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
量子位
小众软件
小众软件
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
N
Netflix TechBlog - Medium
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Y
Y Combinator Blog
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Schneier on Security
D
Docker
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
H
Help Net Security
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
B
Blog
Know Your Adversary
Know Your Adversary
IT之家
IT之家

博客园 - 一般一般

linux ps命令使用详解 OBIEE的迁移部署 Oracle插入数据时获取自增ID parentNode、parentElement,childNodes、children 它们有什么 css颜色渐变-Z - 一般一般 - 博客园 好久没来了 wuyu的vs2005 地址收藏 test google whether A point is included in the polygon 2008-5-16 my map [转载]深入浅出URL编码 将dom.document存放在文件中 - 一般一般 - 博客园 [zhuan]女性:25岁为生活而工作,35岁为工作而生活 有感于价格上涨 今天碰到一个AO郁闷的问题,解决了,贴出来,大家交流 [转]JSP中,AJAX使用POST方式提交中文乱码问题解决 美女与野兽 Java 的String.Split(arg)?? - 一般一般 - 博客园
Oracle IN 和 EXISTS比较小结[转]
一般一般 · 2009-08-27 · via 博客园 - 一般一般

1) select * from T1 where exists(select 1 from T2 where T1.a=T2.a) ;

    T1数据量小而T2数据量非常大时,T1<<T2 时,1) 的查询效率高。
        当T1和T2记录数据都非常大比如上千条时,也只能靠exists了
        如果对执行速度还不满意可以加上/*+parallel(a,N)*/ 用并行来提高效率,N代表数据库负载承受下可并 行的线程数,可以自定。
          这时如果用in查询,无疑相当于慢性自杀!

2) select * from T1 where T1.a in (select T2.a from T2) ;

     T1数据量非常大而T2数据量小时,T1>>T2 时,2) 的查询效率高。
        
实践中证明在exists子句中附加上rownum<2条件速度更快,在记录不是太多的数据查询里可能没多大区别,可是在成千上万甚至过亿条记录中提高到效率非常明显了。