Oracle SQL optimization Consultant

Source: Internet
Author: User

Oracle SQL optimization Consultant

-- Authorization
Grant administer any SQL tuning set to scott;
Grant advisor to scott;
Grant create any SQL profile to scott;
Grant alter any SQL profile to scott;
Grant drop any SQL profile to scott;


-- Create a task
Declare
Tuning_task_name VARCHAR2 (30 );
Tuning_sqltext CLOB;
Begin
Tuning_sqltext: = 'select job from emp'; -- Note: * is not supported here. Enter the field name.
Tuning_task_name: = DBMS_SQLTUNE.CREATE_TUNING_TASK (
SQL _text => tuning_sqltext,
User_name => 'Scott ',
Scope => 'computing ',
Time_limit => 60,
Task_name => 'SQL _ trace_20131124 ',
Description => 'empselect TUNE ');
End;


-- View all created tasks
Select * from user_advisor_log;


-- Task execution
Exec dbms_sqltune.execute_tuning_task (task_name => 'SQL _ trace_20131124 ');


-- Check the status after the task is executed
Select * from user_advisor_tasks t where t. task_name = 'SQL _ trace_20131124'


-- Generate the Final Report
Select dbms_sqltune.report_tuning_task ('SQL _ trace_20131124') from dual;


-- Delete a task
Exec dbms_sqltune.drop_tuning_task ('SQL _ trace_20131124 ');

Oracle Update Execution Plan Principle Analysis and Optimization

Oracle tablespace management and optimization

Oracle table connection modes (SQL optimization)

Summary of Oralce database Optimization

Oracle-insert Performance Optimization

Oracle data block optimization parameters

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.