1、以sys运行$ORACLE_HOME/sqlplus/admin/plustrce.sql
2、在user用户下运行$ORACLE_HOME/rdbms/admin/utlxplan.sql,用于建plan_table表,并Grant PLUSTRACE to user
参数:
SET AUTOTRACE OFF : No AUTOTRACE report is generated. This is the default.
SET AUTOTRACE ON EXPLAIN : The AUTOTRACE report shows only the optimizer execution path.
SET AUTOTRACE ON STATISTICS : The AUTOTRACE report shows only the SQL statement execution statistics.
SET AUTOTRACE ON : The AUTOTRACE report includes both the optimizer execution path and the SQL statement execution statistics.
SET AUTOTRACE TRACEONLY : Like SET AUTOTRACE ON, but suppresses the printing of the user's query output, if any.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-84320/ ,如需转载,请注明出处,否则将追究法律责任。