zoukankan      html  css  js  c++  java
  • Hint usenl usage /*+ leading(emp,dept) usenl(emp) */

    SQL> select /*+ leading(emp,dept) usenl(emp) */ emp.*,dept.* from tb_emp03 emp,tb_dept03 dept where emp.deptno=dept.id;
    
    执行计划
    ----------------------------------------------------------
    Plan hash value: 960397288
    
    ----------------------------------------------------------------------------------------
    | Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |           |  1818K|    97M|       |  8558   (1)| 00:01:43 |
    |*  1 |  HASH JOIN         |           |  1818K|    97M|    99M|  8558   (1)| 00:01:43 |
    |   2 |   TABLE ACCESS FULL| TB_EMP03  |  2000K|    76M|       |  3601   (1)| 00:00:44 |
    |   3 |   TABLE ACCESS FULL| TB_DEPT03 |    10 |   160 |       |     3   (0)| 00:00:01 |
    ----------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - access("EMP"."DEPTNO"="DEPT"."ID")
       
    SQL> select /*+ leading(emp,dept) usenl(dept) */ emp.*,dept.* from tb_emp03 emp,tb_dept03 dept where emp.deptno=dept.id;
    
    执行计划
    ----------------------------------------------------------
    Plan hash value: 960397288
    
    ----------------------------------------------------------------------------------------
    | Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |           |  1818K|    97M|       |  8558   (1)| 00:01:43 |
    |*  1 |  HASH JOIN         |           |  1818K|    97M|    99M|  8558   (1)| 00:01:43 |
    |   2 |   TABLE ACCESS FULL| TB_EMP03  |  2000K|    76M|       |  3601   (1)| 00:00:44 |
    |   3 |   TABLE ACCESS FULL| TB_DEPT03 |    10 |   160 |       |     3   (0)| 00:00:01 |
    ----------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - access("EMP"."DEPTNO"="DEPT"."ID")
  • 相关阅读:
    14. D3D光照
    17. 增加对硬件光照的支持
    ECommerce Starter Kit 数据库表和存储过程一览
    使用 DataAdapter 执行批量更新
    学习Professional ASP.NET 2.0(四)
    c#泛型学习(二)
    学习Professional ASP.NET 2.0(一)
    学习Professional ASP.NET 2.0(二)
    下载:微软网页设计工具CTP测试版(支持asp.net2.0)
    学习ECommerce Starter Kit (1)
  • 原文地址:https://www.cnblogs.com/heyang78/p/12237397.html
Copyright © 2011-2022 走看看