In oracle, the v $ session_longops view describes the operations that DBAs often need to monitor databases that take a lot of time, such as backup recovery, collection of statistics, and sorting. This view mainly shows the status of database operations that have been running for more than 6 seconds. Therefore, it is very meaningful for the database to monitor some time-consuming operations. Www.2cto.com and you can view the progress of a process. Let's take a look at the structure of this view: the V $ SESSION_LONGOPS column describes SID: Session id serial #: Session string number OPNAME: Brief description of the operation TARGET: the object where the operation is running TARGET_DESC: description of target object SOFAR: total workload TOTALWORK: total workload UNITS: workload unit www.2cto.com START_TIME: operation start time LAST_UPDATE_TIME: Last Update Time of Statistics item TIME_REMAINING: the remaining time (in seconds) for the operation to be completed ELAPSED_SECONDS: Total time (in seconds) from the operation start. CONTEXT: MESSAGE of the frontend and backend relationship: complete description of the statistical item USERNAME: User IDSQL_ADDRESS of the operation to be executed: SQL _HASH_VALUE used to connect to the queried column QCSID: www.2cto.com example: create a data table with a large data volume. The statement is as follows: SQL code create table log _ as select level lv, rownum rn from dual connect by level <10000000; insert into log _ value select level lv, rownum rn from dual connect by level <10000000; run the following command to query the log _ table: SQL code SQL> set timing on; SQL> select count (1) from log _ t; COUNT (1) ---------- 19999998 Executed in 6.438 seconds execute the following SQL statement. SQL code select * from sys. v _ $ session_longops t where t. TARGET like '% LOG _'; you will find that the record whose execution time is greater than 6 seconds has been recorded in the v _ $ session_longops view. under www.2cto.com, you can use the associated query to query the complete content of the SQL statement (that is, you can query all the statements whose execution time is greater than 6 seconds ). SQL code select * from v $ SQL a, v $ session_longops B where. SQL _ID = B. SQL _ID; SQL code select * from v $ sqlarea a, v $ session_longops B where. HASH_VALUE = B. SQL _HASH_VALUE;. SQL _TEXT and. SQL _FULLTEXT indicates the executed SQL statement. normal SQL _TEXT displays the SQL statement to be queried. If the statement is too long,. check the SQL _FULLTEXT field. you can also use v $ session_longops and v $ session to query the session information. SQL code select * from v $ session a, v $ session_longops B where. SID = B. SID and. SERIAL # = B. SERIAL #;