Oracle Statistical information Collection

Source: Internet
Author: User
Tags sqlplus

Statistical information Collection

1: Create Analysis Table

$ cd $ORACLE _home/rdbms/admin

$ sqlplus/as SYSDBA

> @utlxplan. SQL


2: For convenience, you can create a synonym table ( by default only the SYS user can use )
sql> create public synonym plan_tables for plan_table;


3: Give the table permissions to everyone, or to the designated person
Sql> Grant all on plan_tables to public;


4: Create a plustrace role

$ cd $ORACLE _home/sqlplus/admin

$ sqlplus/as SYSDBA

> @plustrce. SQL


5: Give it permission to public
Sql> Grant plustrace to public;


6: Set display mode
Sql> set Autotrace off; # #在默认中是这个, do not show autotrace
Sql> set Autotrace explain; # #只显示优化器执行路径
sql> set Autotrace traceonly; # #不现实用户的查询输出

Sql> set autotrace on; # #报告显示优化器执行路径



Oracle Statistical information Collection

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.