To add, if you want to do a SQL automatic audit tool, where can I start?
1, through the Sql*plus tool in the explain PLAN for judgment, the use of Dbms_xplan. Display displays.
2, through the Sql*plus tool in the SET autotrace command display
3, Sql_trace, in the database global (performance problem, is basically a waste of options), or to the current session definition Sql_trace, or use Dbms_system. Set_sql_trace_in_session gets the sql_trace of the other session. Use Tkprof to parse the trace file to read the execution plan.
4, using 10046 Tracefile_identifier event acquisition
5, SQLT tool, according to the sql_id into the database to get a very detailed execution plan around this SQL, statistics, sub-cursors and other related information.
6, PL/SQL Developer, TOAD and other tools (where are their data?) Is it accurate? )
7, v$ view, as follows:
SELECT * from V$sql_plan
SELECT * from v$rsrc_plan_cpu_mth
SELECT * from V$sql_plan_statistics
SELECT * from V$sql_plan_statistics_all
SELECT * from V$sqlarea_plan_hash
SELECT * from V$rsrc_plan_history
How many ways to view the execution plan for an Oracle SQL statement-SQL EXECUTE plan