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

  1. <legend id='qOEsU'><style id='qOEsU'><dir id='qOEsU'><q id='qOEsU'></q></dir></style></legend>

  2. <small id='qOEsU'></small><noframes id='qOEsU'>

    <i id='qOEsU'><tr id='qOEsU'><dt id='qOEsU'><q id='qOEsU'><span id='qOEsU'><b id='qOEsU'><form id='qOEsU'><ins id='qOEsU'></ins><ul id='qOEsU'></ul><sub id='qOEsU'></sub></form><legend id='qOEsU'></legend><bdo id='qOEsU'><pre id='qOEsU'><center id='qOEsU'></center></pre></bdo></b><th id='qOEsU'></th></span></q></dt></tr></i><div id='qOEsU'><tfoot id='qOEsU'></tfoot><dl id='qOEsU'><fieldset id='qOEsU'></fieldset></dl></div>
    <tfoot id='qOEsU'></tfoot>
    1. 内连接 vs Where

      Inner join vs Where(内连接 vs Where)

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

              • <small id='47F9H'></small><noframes id='47F9H'>

                <legend id='47F9H'><style id='47F9H'><dir id='47F9H'><q id='47F9H'></q></dir></style></legend>
              • 本文介绍了内连接 vs Where的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                两者之间的性能(在oracle中)是否存在差异

                Is there a difference in performance (in oracle) between

                Select * from Table1 T1 
                Inner Join Table2 T2 On T1.ID = T2.ID
                

                Select * from Table1 T1, Table2 T2 
                Where T1.ID = T2.ID
                

                ?

                推荐答案

                不!同样的执行计划,看这两张表:

                No! The same execution plan, look at these two tables:

                CREATE TABLE table1 (
                  id INT,
                  name VARCHAR(20)
                );
                
                CREATE TABLE table2 (
                  id INT,
                  name VARCHAR(20)
                );
                

                使用内连接的查询的执行计划:

                The execution plan for the query using the inner join:

                -- with inner join
                
                EXPLAIN PLAN FOR
                SELECT * FROM table1 t1
                INNER JOIN table2 t2 ON t1.id = t2.id;
                
                SELECT *
                FROM TABLE (DBMS_XPLAN.DISPLAY);
                
                -- 0 select statement
                -- 1 hash join (access("T1"."ID"="T2"."ID"))
                -- 2 table access full table1
                -- 3 table access full table2
                

                以及使用 WHERE 子句的查询的执行计划.

                And the execution plan for the query using a WHERE clause.

                -- with where clause
                
                EXPLAIN PLAN FOR
                SELECT * FROM table1 t1, table2 t2
                WHERE t1.id = t2.id;
                
                SELECT *
                FROM TABLE (DBMS_XPLAN.DISPLAY);
                
                -- 0 select statement
                -- 1 hash join (access("T1"."ID"="T2"."ID"))
                -- 2 table access full table1
                -- 3 table access full table2
                

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

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

                相关文档推荐

                Select n random rows from SQL Server table(从 SQL Server 表中随机选择 n 行)
                SQL query to select dates between two dates(用于选择两个日期之间的日期的 SQL 查询)
                How can I delete using INNER JOIN with SQL Server?(如何在 SQL Server 中使用 INNER JOIN 进行删除?)
                Table Naming Dilemma: Singular vs. Plural Names(表命名困境:单数与复数名称)
                INSERT statement conflicted with the FOREIGN KEY constraint - SQL Server(INSERT 语句与 FOREIGN KEY 约束冲突 - SQL Server)
                How ROWNUM works in pagination query?(ROWNUM 如何在分页查询中工作?)
                <tfoot id='jCJAc'></tfoot>

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

              • <legend id='jCJAc'><style id='jCJAc'><dir id='jCJAc'><q id='jCJAc'></q></dir></style></legend>

                      <tbody id='jCJAc'></tbody>

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