How to view the execution plan on the Oracle client

Source: Internet
Author: User


How to view the execution plan in the Oracle client 1. run the "explain Plan" Syntax: SQL> Explain plan for www.2cto.com Try this command: SQL> explain plan for select * from mtl_system_items_ B where inventory_item_id = 149 and organization_id = 207; the explain command will generate an execution plan and save the execution plan to "PLAN_TABLE. 2. view execution plan SQL> select * from table (dbms_xplan.display); (dbms_xplan.display () is a packaged function used to view the execution plan generated .) www.2cto.com Output like: SQL> select * from table (dbms_xplan.display); PLAN_TABLE_OUTPUT partition Plan hash value: 780806759 -------------------------------- Role | Id | Operation | Name | Rows | Bytes | Cost (% CPU) | Time | percent | 0 | select statement | 1 | 554 | 2 (0) | 00:00:01 | 1 | table access by index rowid | MTL_SYSTEM_ITEMS_ B | 1 | 554 | 2 (0) | 00:00:01 | * 2 | INDEX UNIQUE SCAN | M TL_SYSTEM_ITEMS_ B _U1 | 1 | 1 (0) | 00:00:01 | www.2cto.com classified Predicate Information (identified by operation id): California 2-access ("INVENTORY_ITEM_ID" = 149 AND "ORGANIZATION_ID" = 207) 14 rows have been 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.