?????????????????????????渭?????????Oracle“??效???”??SQL???:

????SELECT EXECUTIONS ?? DISK_READS?? BUFFER_GETS??

????ROUND((BUFFER_GETS-DISK_READS)/BUFFER_GETS??2) Hit_radio??

????ROUND(DISK_READS/EXECUTIONS??2) Reads_per_run??

????SQL_TEXT

????FROM V$SQLAREA

????WHERE EXECUTIONS>0

????AND BUFFER_GETS >0

????AND (BUFFER_GETS-DISK_READS)/BUFFER_GETS < 0.8

????ORDER BY 4 DESC;

?????????些?????ORACLE????????慰?Oracle????????????

??????????????????TKPROF?????????SQL????????

????SQL trace ?????????????械?SQL??????????????????????????????. ???????????????????????????

???????纾�????????????写?????CPU???????.

??????些?????????????????????.

????????SQL TRACE???????: ??效

????ALTER SESSION SET SQL_TRACE TRUE;

????????SQL TRACE ?????????????效

????SQL_TRACE=TRUE??

????TIMED_STATISTICS=ON

????USER_DUMP_DEST???????????????????????

??????TKPROF??????????TRC????????Jason???????????

?????????????????EXPLAIN PLAN ????SQL???

????EXPLAIN PLAN ????????????SQL???????

????????????????????SQL??????路??????

???????????????????????ORACLE????????????Plan_table

????@RDBMSADMINutlxplan.sql

????Explain Plan ???梅????锟�?

????explain plan

????[set statement_id = ‘text’]

????[into [owner.]table_name]

????for statement;

????????????AUTOTRACE

????SQL> set autotrace on

????SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabledS

????P2-0611: Error enabling STATISTICS report

????SQL>@SQLPLUSadminplustrace.sql

????AUTOTRACE

????SQL> SET AUTOTRACE ON

????SQL> SET AUTOTRACE TRACEONLY

????SQL> SELECT …..

????Oracle??????????????????????tuning task??tuning set????oracle??Jason???????些????????TKPROF???梅?