Comparison of execution plan changes used by index_sshint

Source: Internet
Author: User
In comparison to the execution plan changes used by index_sshint, buffer represents the number of memory reads in the current operation, including consistent read and current read, although the number of records in the emp table is small, however, the difference in the number of buffer read memories is still a little large. SQLselectjobfromempwhereenameSMITH; JOB---CLERK

In comparison to the execution plan changes used by index_ss hint, buffer represents the number of memory reads in the current operation, including consistent read and current read, although the number of records in the emp table is small, however, the difference in the number of buffer READ memory times is still a little large. SQL select job from emp where ename = SMITH; JOB ---------------- CLERK

Comparison of execution plan changes used by index_ss hint

Buffer indicates the number of memory reads in the current operation, including consistent read and current read.

Although the number of records in the emp table is small, the number of buffer Read Memories remains a little different

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
Zookeeper --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL _ID at8ssqpn41css, child number 0
-------------------------------------
Select/* + index_ss (emp I _emp) */job from emp where ename = 'Smith'

Plan hash value: 3956160932

Bytes ------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Time | Buffers |
Bytes ------------------------------------------------------------------------------------
| * 1 | table access full | EMP | 1 | 1 | 1 | 00:00:00. 01 | 8 |
Bytes ------------------------------------------------------------------------------------

PLAN_TABLE_OUTPUT
Zookeeper --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id ):
---------------------------------------------------

1-filter ("ENAME" = 'Smith ')

17 rows selected.

---- Create an index

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
Zookeeper --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL _ID ck2pc7bpbzdz8, child number 0
-------------------------------------
Select/* + index_ss (emp I _emp) */job from emp where ename = 'Smith'

Plan hash value: 98078853

Bytes -----------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Time | Buffers |
Bytes -----------------------------------------------------------------------------------------------
| 1 | table access by index rowid | EMP | 1 | 1 | 00:00:00. 01 | 3 |
| * 2 | index skip scan | I _EMP | 1 | 1 | 1 | 00:00:00. 01 | 2 |

PLAN_TABLE_OUTPUT
Zookeeper --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Bytes -----------------------------------------------------------------------------------------------

Predicate Information (identified by operation id ):
---------------------------------------------------

2-access ("ENAME" = 'Smith ')
Filter ("ENAME" = 'Smith ')

19 rows selected.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.