index_sshint使用的执行计划变化对比
index_ss hint 使用的执行计划变化对比 其中 buffer 代表:当前操作中发生的内存读次数,包含一致性读和当前读 虽然 emp 表记录数不多,但是buffer 读内存的次数差别还是有点大的 SQL select job from emp where ename=SMITH; JOB ------------------ CLERK
index_ss hint 使用的执行计划变化对比
其中 buffer 代表:当前操作中发生的内存读次数,包含一致性读和当前读
虽然 emp 表记录数不多,但是buffer 读内存的次数差别还是有点大的
SQL> select job from emp where ename='SMITH';
JOB
------------------
CLERK
SQL> select * from table(dbms_xplan.display_cursor(null,null,'allstats last'))
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID at8ssqpn41css, child number 0
-------------------------------------
select /*+ index_ss(emp i_emp)*/ job from emp where ename='SMITH'
Plan hash value: 3956160932
------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
------------------------------------------------------------------------------------
|* 1 | TABLE ACCESS FULL| EMP | 1 | 1 | 1 |00:00:00.01 | 8 |
------------------------------------------------------------------------------------
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("ENAME"='SMITH')
17 rows selected.
----创建一个索引
SQL> create index i_emp on emp(empno, ename);
Index created.
SQL> select /*+ index_ss(emp i_emp)*/ job from emp where ename='SMITH';
JOB
------------------
CLERK
SQL> select * from table(dbms_xplan.display_cursor(null,null,'allstats last'))
2 ;
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID ck2pc7bpbzdz8, child number 0
-------------------------------------
select /*+ index_ss(emp i_emp)*/ job from emp where ename='SMITH'
Plan hash value: 98078853
-----------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
-----------------------------------------------------------------------------------------------
| 1 | TABLE ACCESS BY INDEX ROWID| EMP | 1 | 1 | 1 |00:00:00.01 | 3 |
|* 2 | INDEX SKIP SCAN | I_EMP | 1 | 1 | 1 |00:00:00.01 | 2 |
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("ENAME"='SMITH')
filter("ENAME"='SMITH')
19 rows selected.
上一篇: Java+微信公众号开发过程步骤详解
推荐阅读
-
使用IntelliJ IDEA 进行代码对比的方法(两种方法)
-
php使用mysqli和pdo扩展,测试对比mysql数据库的执行效率完整示例
-
php使用mysqli和pdo扩展,测试对比连接mysql数据库的效率完整示例
-
AndroidX下使用Activity和Fragment的变化详解
-
AndroidX下使用Activity和Fragment的变化详解
-
Perl5和Perl6对比使用Sigils的差别
-
MyBatis中XML和注解的对比及使用
-
UG10.0使用变化扫略功能绘图的实例教程
-
oracle 使用递归的性能提示测试对比
-
微信开发中使用微信JSSDK和使用URL.createObjectURL上传预览图片的不同处理对比