2 Replies Latest reply: Jul 12, 2010 9:13 AM by 618702 RSS

    DELETE QUERY

    782482
      Hi,
      My database

      Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
      PL/SQL Release 10.2.0.4.0 - Production
      CORE     10.2.0.4.0     Production
      TNS for Solaris: Version 10.2.0.4.0 - Production
      NLSRTL Version 10.2.0.4.0 - Production

      Delete process is running using which view we can see how long this delete will run.can you give the query to find out.
        • 1. Re: DELETE QUERY
          Aman....
          If you haven't started your operation by setting some id, AFAIK , there is no option to do so. You have to wait and watch.

          HTH
          Aman....
          • 2. Re: DELETE QUERY
            618702
            Dear sharmistanis,

            You can use the v$session_longops fixed view. Here is a simple example;
            First session;
            SQL> select a.sql_id, b.sql_text, opname, target, username, sofar, totalwork 
                     from v$session_longops a, v$sql b 
                     where username='OGAN' and a.sql_id = b.sql_id;
            
            SQL_ID SQL_TEXT
            OPNAME                                                           TARGET                                                           USERNAME                            SOFAR  TOTALWORK
            ----------------
            Table Scan                                                       OGAN.OGAN_DENEME                                                 OGAN                                 4379      78893
            
            1bmg9nrw5udjx
            delete ogan_deneme
            
            Second session;
            SQL> delete ogan_deneme;
            Hope it Helps,

            Ogan

            Edited by: Ogan Ozdogan on 12.Tem.2010 17:11

            Also you can convert the sofar and totalwork to a time value and/or percentage completed parameter. You will have to modify my SQL in order to do that.

            Ogan