Time:
Select Sql_id,sid,serial#,username,target, Sql_plan_operation,sofar blocks_read,totalwork total_blocks,round (time_ REMAINING/60) minutes from V$session_longops
where sofar<>totalwork
and Username= ' XXX '
Sofar:units of work do so far for the operation specified in the Opname column
This value will always increase.
Totalwork:total units of work for the operation specified in the Opname column
Estimated total data block read volume, does not change
Time_remaining:estimate (in seconds) of time remaining for the operation to complete
V$session_longops Displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more Operations is added for every Oracle release.
The official documentation does not provide a detailed introduction to the V$session_longops principle, and to monitor an operation through V$session_longops, the following conditions are required:
1 perform operation for more than 6 seconds
2 Execute Operation Access data block must be greater than 10000
3 must be set timed_statistics or open Sql_trace
4 The correspondence in the performing operation must be analyzed by dbms_stats or analyze
Io
Select Sql_id,disk_reads from
(select sql_id,buffer_gets,disk_reads,sorts,cpu_time/1000000 cpu,rows_processed,elapsed_time from V$sqlstats
ORDER BY disk_reads Desc
---The exact sort of information to choose from, and the multiple values in this view are cumulative
Oracle consumes more resources for SQL