Oracle and cannot set autotrace solve the problem

Source: Internet
Author: User

1. Set autotrace Parameters

Set autotrace off ---------------- do not generate autotrace Report, which is the default mode
Set autotrace on explain ------ autotrace only displays the optimizer execution path report
Set autotrace on statistics -- display only execution statistics
Set autotrace on ----------------- contains the execution plan and statistics
Set autotrace traceonly ------ same as set autotrace on, but no query output is displayed

2. It can only be executed under SQL plus

SQL> set autotrace on;
SQL> select count (*) from oz_member;

Count (*)
----------
472

Execution Plan
----------------------------------------------------------

-------------------------------------------------------
| ID | operation | Name | rows | cost (% CPU) |
-------------------------------------------------------
| 0 | SELECT statement | 1 | 1 (0) |
| 1 | sort aggregate | 1 |
| 2 | index full scan | pk1_1 | 472 | 1 (0) |
-------------------------------------------------------

Note
-----
-'Plan _ table' is old version

Statistics
----------------------------------------------------------
193 recursive cballs
0 dB block gets
34 consistent gets
0 physical reads
0 redo size
409 bytes sent via SQL * Net to client
385 bytes encoded ed via SQL * Net From Client
2 SQL * Net roundtrips to/from client
0 sorts (memory)
0 sorts (Disk)
1 rows processed,

 

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.