<bdo id='kWfno'></bdo><ul id='kWfno'></ul>

      1. <legend id='kWfno'><style id='kWfno'><dir id='kWfno'><q id='kWfno'></q></dir></style></legend>
      2. <i id='kWfno'><tr id='kWfno'><dt id='kWfno'><q id='kWfno'><span id='kWfno'><b id='kWfno'><form id='kWfno'><ins id='kWfno'></ins><ul id='kWfno'></ul><sub id='kWfno'></sub></form><legend id='kWfno'></legend><bdo id='kWfno'><pre id='kWfno'><center id='kWfno'></center></pre></bdo></b><th id='kWfno'></th></span></q></dt></tr></i><div id='kWfno'><tfoot id='kWfno'></tfoot><dl id='kWfno'><fieldset id='kWfno'></fieldset></dl></div>

      3. <tfoot id='kWfno'></tfoot>
      4. <small id='kWfno'></small><noframes id='kWfno'>

        显式连接与隐式连接?

        Explicit JOINs vs Implicit joins?(显式连接与隐式连接?)

          <small id='S6mzF'></small><noframes id='S6mzF'>

            <bdo id='S6mzF'></bdo><ul id='S6mzF'></ul>
              <i id='S6mzF'><tr id='S6mzF'><dt id='S6mzF'><q id='S6mzF'><span id='S6mzF'><b id='S6mzF'><form id='S6mzF'><ins id='S6mzF'></ins><ul id='S6mzF'></ul><sub id='S6mzF'></sub></form><legend id='S6mzF'></legend><bdo id='S6mzF'><pre id='S6mzF'><center id='S6mzF'></center></pre></bdo></b><th id='S6mzF'></th></span></q></dt></tr></i><div id='S6mzF'><tfoot id='S6mzF'></tfoot><dl id='S6mzF'><fieldset id='S6mzF'></fieldset></dl></div>

                <legend id='S6mzF'><style id='S6mzF'><dir id='S6mzF'><q id='S6mzF'></q></dir></style></legend>
                  <tbody id='S6mzF'></tbody>

                  <tfoot id='S6mzF'></tfoot>
                • 本文介绍了显式连接与隐式连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的数据库教授告诉我们使用:

                  My Database Professor told us to use:

                  SELECT A.a1, B.b1 FROM A, B WHERE A.a2 = B.b2;
                  

                  而不是:

                  SELECT A.a1, B.b1 FROM A INNER JOIN B ON A.a2 = B.b2;
                  

                  据说 Oracle 不喜欢 JOIN 语法,因为这些 JOIN 语法比笛卡尔积的 WHERE 限制更难优化.

                  Supposedly Oracle don't likes JOIN-Syntaxes, because these JOIN-syntaxes are harder to optimize than the WHERE restriction of the Cartesian Product.

                  我无法想象为什么会这样.唯一的性能问题可能是解析器需要再解析几个字符.但这在我看来微不足道.

                  I can't imagine why this should be the case. The only Performance issue could be that the parser Needs to parse a few characters more. But that is negligible in my eyes.

                  我发现了这个堆栈溢出问题:

                  I found this Stack Overflow Questions:

                  • 是是否有关于使用显式 ANSI JOIN 与隐式连接的 Oracle 官方建议?
                  • 显式与隐式 SQL 连接

                  Oracle 文档中的这句话:https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries006.htm

                  And this sentence in a Oracle Documentation: https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries006.htm

                  Oracle 建议您使用 FROM 子句 OUTER JOIN 语法而不是 Oracle 连接运算符.

                  Oracle recommends that you use the FROM clause OUTER JOIN syntax rather than the Oracle join operator.

                  有人可以通过链接向我提供来自 Oracle 的最新建议吗?因为她不承认 StackOverflow(这里可以回答每个人)并且 10g 文档在这里眼中已经过时了.

                  Can someone give me up-to-date recommendations from Oracle with link. Because she don't acknowledges StackOverflow (here can answer everyone) and the 10g Documentation is outdated in here eyes.

                  如果我错了,而且 Oracle 现在真的不喜欢 JOINS,那也没关系,但我找不到文章.我只想知道谁是对的.

                  If i am wrong and Oracle realy don't likes JOINS now than thats also ok, but i don't find articles. I just want to know who is Right.

                  非常感谢所有能帮助我的人!

                  Thanks a lot to everyone who can help me!

                  推荐答案

                  您的教授应该与哥伦比亚大学计算机科学教授 Gordon Linoff 交谈.Gordon 和该站点上的大多数 SQL 爱好者几乎总是会告诉您使用显式连接语法.造成这种情况的原因很多,包括(但不限于):

                  Your professor should speak with Gordon Linoff, who is a computer science professor at Columbia University. Gordon, and most SQL enthusiasts on this site, will almost always tell you to use explicit join syntax. The reasons for this are many, including (but not limited to):

                  • 显式连接可以很容易地看出实际的连接逻辑是什么.另一方面,隐式连接通过将连接逻辑分散到 FROMWHERE 子句中来混淆连接逻辑.
                  • ANSI 92 标准建议使用现代显式连接,实际上弃用了您的教授似乎正在推动的隐式连接
                  • Explicit joins make it easy to see what the actual join logic is. Implicit joins, on the other hand, obfuscate the join logic, by spreading it out across both the FROM and WHERE clauses.
                  • The ANSI 92 standard recommends using modern explicit joins, and in fact deprecated the implicit join which your professor seems to be pushing

                  关于性能,据我所知,您编写的查询的两个版本都将在后台优化为相同的内容.您可以随时检查两者的执行计划,但我怀疑您经常会看到显着差异.

                  Regarding performance, as far as I know, both versions of the query you wrote would be optimized to the same thing under the hood. You can always check the execution plans of both, but I doubt you would see a significant difference very often.

                  这篇关于显式连接与隐式连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What are the advantages of VistaDB(VistaDB有什么优势)
                  In SQLite, do prepared statements really improve performance?(在 SQLite 中,准备好的语句真的能提高性能吗?)
                  SQLite insert speed slows as number of records increases due to an index(SQLite 插入速度随着索引数量的增加而变慢)
                  sqlite select with condition on date(sqlite 选择日期条件)
                  What if I don#39;t close the database connection in Python SQLite(如果我不关闭 Python SQLite 中的数据库连接怎么办)
                  What is a good OO C++ wrapper for sqlite(什么是 sqlite 的好的 OO C++ 包装器)
                    <bdo id='jrIC7'></bdo><ul id='jrIC7'></ul>
                          <tbody id='jrIC7'></tbody>

                          <i id='jrIC7'><tr id='jrIC7'><dt id='jrIC7'><q id='jrIC7'><span id='jrIC7'><b id='jrIC7'><form id='jrIC7'><ins id='jrIC7'></ins><ul id='jrIC7'></ul><sub id='jrIC7'></sub></form><legend id='jrIC7'></legend><bdo id='jrIC7'><pre id='jrIC7'><center id='jrIC7'></center></pre></bdo></b><th id='jrIC7'></th></span></q></dt></tr></i><div id='jrIC7'><tfoot id='jrIC7'></tfoot><dl id='jrIC7'><fieldset id='jrIC7'></fieldset></dl></div>
                          <tfoot id='jrIC7'></tfoot>
                          • <small id='jrIC7'></small><noframes id='jrIC7'>

                            <legend id='jrIC7'><style id='jrIC7'><dir id='jrIC7'><q id='jrIC7'></q></dir></style></legend>