Index uniqueness Scan (index unique scan)

Source: Internet
Author: User

The index unique scan, which is a scan of a unique index, applies only to the target SQL that is the equivalent query in the WHERE condition. Because the scanned object is a unique index, the results of the index uniqueness scan will return at most one record.

Empno is primary key in the EMP table, corresponding to a unique index


[Email protected]> SELECT * from emp where empno=7369;


Execution plan
----------------------------------------------------------
Plan Hash value:2949544139

--------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU) | Time |
--------------------------------------------------------------------------------------
| 0 |        SELECT STATEMENT |     |    1 |     38 | 1 (0) | 00:00:01 |
|  1 | TABLE ACCESS by INDEX rowid|     EMP |    1 |     38 | 1 (0) | 00:00:01 |
|* 2 | INDEX UNIQUE SCAN |     Pk_emp |       1 |     | 0 (0) | 00:00:01 |
--------------------------------------------------------------------------------------

predicate information (identified by Operation ID):
---------------------------------------------------

2-access ("EMPNO" =7369)


Statistical information
----------------------------------------------------------
Recursive calls
0 db Block gets
Consistent gets
Physical Reads
0 Redo Size
898 bytes sent via sql*net to client
533 Bytes received via sql*net from client
1 sql*net roundtrips To/from Client
8 Sorts (memory)
0 Sorts (disk)
1 rows processed

[Email protected]>

View Code

As you can see from the above, the execution plan for "select * from emp where empno=7369" is an index-unique scan.

Index uniqueness Scan (index unique scan)

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.