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")
  • 相关阅读:
    用PHP如何打造一个高可用高性能的网站
    php 数据批量插入mysql和mysql类
    PHP8新特性
    php 爬取抖音评论数据
    Python学习笔记之7.5
    mysql基本概念
    开发google插件
    php curl 重定向 cookie问题
    git 入门
    git对已经提交过的文件添加到.gitignore
  • 原文地址:https://www.cnblogs.com/heyang78/p/12237397.html
Copyright © 2011-2022 走看看