Table Access in Oracle execution plan

Source: Internet
Author: User

This article records some Oracle Table Access Operations

For the stored procedure of displaying the execution plan in Oracle, see

(1) TABLE ACCESS FULL

Scan a table from a full table and access the table through a full table scan. Example:

SQL> exec SQL _explain ('select * from t1 ');
Plan hash value: 3617692013
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (% CPU) | Time |
--------------------------------------------------------------------------
| 0 | select statement | 10 | 80 | 3 (0) | 00:00:01 |
| 1 | table access full | T1 | 10 | 80 | 3 (0) | 00:00:01 |
--------------------------------------------------------------------------

PL/SQL procedure successfully completed.

(2) TABLE ACCESS BY INDEX ROWID

Use the ROWID obtained by the index to access the table. Example:

SQL> exec SQL _explain ('select * from t1 where id = 1 ');
Plan hash value: 2347959165
Bytes -------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (% CPU) | Time |
Bytes -------------------------------------------------------------------------------------
| 0 | select statement | 1 | 8 | 1 (0) | 00:00:01 |
| 1 | table access by index rowid | T1 | 1 | 8 | 1 (0) | 00:00:01 |
| * 2 | index unique scan | T1_PK | 1 | 0 (0) | 00:00:01 |
Bytes -------------------------------------------------------------------------------------
Predicate Information (identified by operation id ):
---------------------------------------------------
2-access ("ID" = 1)

PL/SQL procedure successfully completed.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page

Related Article

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.