Oracle SQL 性能分析

Orcle SQl 性能分析
很多时候需要对已有的SQL语句进行优化,优化过程常需要分析SQL实际的执行时间、CPU时间等详细信息

Oracle SQL 性能分析基础

DBA_HIST_SQLSTAT (历史SQL状态表)

参考: https://docs.oracle.com/cd/E18283_01/server.112/e17110/statviews_4051.htm

SQL_ID :SQL identifier of the parent cursor in the library cache
OPTIMIZER_COST :Cost of the query given by the optimizer
SHARABLE_MEM :Amount of shared memory used by the child cursor (in bytes)
VERSION_COUNT :Number of children associated with the cursor
DISK_READS_TOTAL:Cumulative number of disk reads for this child cursor
ROWS_PROCESSED_TOTAL: Cumulative number of rows the parsed SQL statement returns
CPU_TIME_TOTAL : Cumulative value of CPU time (in microseconds) used by this cursor for parsing/executing/fetching
IOWAIT_TOTAL :Cumulative value of user I/O wait time (in microseconds)