Monitoring the progress of a delete operation

Hello All ,
I am deleting a table with 80M records based on rowid . But it appears that its running for so long .
around 12 hrs . I can see an active session with delete statement . But no entry for that session id in v$long_ops .
How can i find out the total percentage of completetion for session ? Please help me with the query
Version Ora10gR2
Thanks
Aneesh

Hi, if you're deleting much more than you keep i suggest you to:
- create a "twin table"
- insert the rows you want to to keep in the twin table
- truncate the original table
- re-insert the copied rows
- commit
- drop the copy table.
The truncate table is much more faster than a delete the complete table (this is a DDL operation while the Delete is a DML operation)
Sorry someoneElse i didn't see you last proposal (it's the same)
Edited by: user11268895 on Jul 10, 2010 3:19 PM
Another way to monitor this operation (if you are in PL/SQL) is to usethe dbms_Application_info package, here is an example:
DECLARE
   i   NUMBER  := 0;
   f   BOOLEAN := FALSE;
BEGIN
   WHILE NOT (f)
   LOOP
      DELETE FROM t1
            WHERE rwonum <= 20000;
      i := i + SQL%ROWCOUNT;
      DBMS_APPLICATION_INFO.set_client_info (   i
                                             || ' record have been deleted...'
      COMMIT;
      IF SQL%ROWCOUNT < 20000
      THEN
         f := TRUE;
      END IF;
   END LOOP;
END;then you'll be able to see how many rows were deleted at "any" time:
SELECT client_info,v.*
  FROM SYS.v_$session vEdited by: user11268895 on Jul 10, 2010 3:20 PM

Similar Messages

  • Monitoring the progress of an HTTP File Request

    Hi,
    I've written a little applet used to sending Files to a PHP-Application. Everything works fine. Now I try to monitor the progress of the upload and I have a little problem. This are the main functions:
         public void addFile (String name, File file) throws IOException {
              this.bytesComplete = file.length();
              addFile(name, file.getPath(), new FileInputStream(file));
         public void addFile (String name, String filename, InputStream is) throws IOException {
              writeBoundary();
              writeName(name);
              write("; filename=\"");
              write(filename);
              write('"');
              newline();
              write("Content-Type: ");
              String type = connection.guessContentTypeFromName(filename);
              if (type == null)  {
                   type = "application/octet-stream";
              writeln(type);
              newline();
              pipe(is, os);
              newline();
         private void pipe(InputStream in, OutputStream out) throws IOException {
              this.bytesWritten = 0;
              byte[] buf = new byte[4096];
              int nread;
              int navailable;
              int total = 0;
              synchronized (in) {
                   while((nread = in.read(buf, 0, buf.length)) >= 0) {
                        out.write(buf, 0, nread);
                        out.flush();
                        total += nread;
                        this.bytesWritten += nread;
              out.flush();
              buf = null;
           }Somewhere else the function is called
         addFile ("file", filelist.get(i));Works fine, but now I've tried to monitor the actual progress by adding the following line between out.write and out.flush in the pipe-method
    int actualStatus = Math.round (this.bytesWritten / this.bytesComplete * 100);
    addProgress (actualStatus); // this method sets a JProgressBarAnd now something strange happens. It seems that all the data first is read so my progress goes to 100% in half a second and then is written later. I understand that os.flush only suggests (!) to write the data but not forces to do so.
    Is there a way to monitor the progress in real-time, so I can show a user how many data already is transferred? To do a real forced flush? Thanks for your help

    Maybe it's a bug: just found this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026745
    Does maybe anybody know a work-around?
    Edited by: thomwiesel on 23.03.2010 13:44
    Edited by: thomwiesel on 23.03.2010 13:45

  • How to monitor the progress of an ORDER Number

    Hi,
    How can I Monitor the progress of an order from the EBS.
    Thanks
    Asis

    I assume you mean sales order.
    You can open the order header and go to tools > workflow status.
    It will show you when the order was entered , was booked and closed.
    You can also see details of all lines for the order.
    If you want to see status of a line, You can also go to line and go to tools > workflow status
    It will show you when it was entered, when booked, when it was progressed to next stages, and closed.
    Hope this helps,
    Sandeep Gandhi

  • Monitoring the Progress of a BufferedImageOp

    I just spent a couple of minutes figuring out how to do this and thought I might
    share it with anyone who's interested.
    Feel free to comment on, criticise, or improve on my approach.
    java.awt.image.BufferedImage sourceImage = ...;
    java.awt.image.BufferedImage targetImage = ...;
    targetImage.getSource().addConsumer(new java.awt.image.ImageConsumer() {
       private int pixelsDrawn = 0;
       public void setPixels(...) {
          // Update the number of pixels drawn so far:
          pixelsDrawn += width * height;
          // TODO: Tell other objects (e.g. a JProgressBar) about the update.
    java.awt.image.BufferedImageOp imageOp = ...;
    imageOp.filter(sourceImage, targetImage);NOTES:
    There are two setPixels() methods.
    Though it is not clear in the Javadoc, I assume only one will ever be called for
    a particular image source. Both still need to be implemented, however, on the
    assumption that you don't know which one will be called for this source.
    The Consumer seems to be notified one row at a time (with ConvolveOp, at least).

    hi
    I tried a similar approach, but i must tell you:
    1. usually one line is scanned in each setPixel say line 1, then line 2.....
    But for many filters these scanning is repeated several times, i.e. after all the lines has been scanned, the scanning is one again, i.e. line 1 is scanned again followed by the others. and this process is repeated 2-5 times depending on the filter.
    So i don't think we can get the progress the filter that way.
    If anyone got any good way to find the progress of a filter, please do let me know. my mailid is [email protected]
    Tanveer

  • 1 I tried dowloading the free trial of indesign but it keeps stoping at 42 percent and won't budge. i have left it running for two days and there was still no progress. 2 I clicked on pin to notification in creative cloud so i could monitor the progress b

    need help

    If you had closed Creative Cloud application .
    Restart the computer once and check.
    If the Creative Cloud desktop app is launched ,
    Before starting installation of InDesign cc app.
    Clear temp folder.
    Please press Windows+R button together and you will get a run command window, please type-in %temp% and hit enter.
    Delete all contents present inside temp folder.
    You may skip the files which cannot be deleted.
    Then start the installation process for Indesign cc 2014.

  • Monitoring progress when performing filter operations on images

    Hi,
    I am working on Java2D and making some image filters using classes like ImageFilter etc. Now For simple filters I want to get the progress status while the filteting is in progress, so that I can show a progress bar in the GUI.
    For this I do not have much idea. I think we can use the ImageConsumer interface, so that if the class implementing that interface list itself as an image consumer with the filter operation. Here is two way I have tried implanting this:
    1st way:
    Class MyConsumer implements ImageConsumer
    int width,height;
    int percentProgress;
    Public image processImage(Image srcImage, ImageFilter filter){
    FilteredImageSource fis: new FilteredImageSource(srcImage.getSource(),filter());
    //should we do this?
    fis.addConsumer(this);
    //or this?
    srcimage.addConsumer(this)
    Image destImage = this.createImage(fis);
    return destImage;
    //implementing methods of imageConsumer
    //we get the width and height of the new destImage (or do we get the dimension of the srcImage here??)
    public void setDimensions(int width, int height){
    this.width=width;
    this.height=height;
    public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize){
    // Is this the correct way of obtaining the progress????
    progressPercent=(y*100)/height;
    //We also have empty implementation of other ImageConsumer methods after this
    --------------------------------------------------------------2nd way, let?s say we use a smooth filter and replace the processImage(..) method above with the one below (the other methods being same):
    Public image processImage(Image srcImage){
    float[] SHARPEN3x3 = {      0.f, -1.f, 0.f,
                                -1.f, 5.0f, -1.f,
                                0.f, -1.f, 0.f};
    BufferedImage dstbimg = new
                  BufferedImage(iw,ih,BufferedImage.TYPE_INT_RGB);
    Kernel kernel = new Kernel(3,3,SHARPEN3x3);
    ConvolveOp cop = new ConvolveOp(kernel,
                                    ConvolveOp.EDGE_NO_OP,
                                    null);
    //should we do this?
    dst.addConsumer(this);
    //or this?
    srcImage.addConsumer(this);
    cop.filter(srcImage,destImage);
    return destImage;
    }Now I do get a progressPercent. But when the percent is 100%, the destimage does not return, that means the operation is not yet complete.
    So is this the correctw ay, or is there any other way to know the progress of the flter operation.
    Also I extended the ImageFilter class and overrode its setPixel method as:
    public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize){
    int progressPercent=(y*100)/height;
    System.out.println("progress in image filter:"+progressPercent);
    //I simply print out the progress and let the super perform the filter operation
    super.setPixels(x, y,w, h, model, pixels, off, scansize);
    //should I do this below? This calls the imageconsumer's setpixels
    //that I implement in the MyConsumer class
    consumer. setPixels(x, y,w, h, model, pixels, off, scansize);
    }I observe that the setPixel method of MyImageFilter is called several times even for the same scan lines, and even after percentProgress is 100%, the process runs again for 2-4 times. So the filtering operation scans the lines several times to finally perform the filtering, and as such the percentProgress is incorrect.
    Can anybody guide me. Is this approach okay and needs to be modified a bit, or there is a different approach to obtain the progress from a filter operation?
    I would finally want the same progress from other operations like LookupOp, ConvolveOp, AffineTransformOp, ColorConvertOp, RescaleOp.
    Thanks in advance
    Tanveer
    DrLaszloJamf, are you there? I am sure you are one of them who can help me in this.
    anyone can send me a private message too at [email protected]

    Please somebody let me know how to get the progress of imagefilter operation using convolveOp.filter(...) or Filteredimagesource. I waant to display the progress i a JProgressbar.

  • Delete Operation in JDBC Sender Adapter not works

    Hi,
        I have one student table which contains the fields ID,Name,BirthMonth,BirthYear,ReadFlag fields. ReadFlag is a character field or lenght 1 which contains only values either 'Y' or ' '. 
         I want to execute delete operation in this table ie to delete the records which contains the readflag = 'Y'. So, I set the below values for the following parameters.
    DELETE FROM student WHERE READFLAG = ' Y '
    Query SQL Statement : SELECT * FROM student WHERE readflag = 'Y'
    Update SQL Statement : DELETE FROM student WHERE READFLAG = 'Y'
    Poll Interval : 60 Seconds.
        There are more records in this table which contains readflag = 'Y'. But, the Adapter does not delete those records from the table i.e delete operation is not executed. At the same time, in Comm. Channel monitoring it does not show any error, but the delete operation is not carried out in the table.
         I tried after 'COMMIT' the table also. But it does not work. What could be the reason ? or How to use Delete Operation effectively on the table ?
         Kindly help me friends to solve this problem.
    Thanking you.
    Kind Regards,
    Jeg.

    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm >>>
    <i>Adapter Work Method
    You must add an indicator that specifies the processing status of each data record in the adapter (data record processed/data record not processed) to the database table.
    The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below).
    <b>Processing can only be performed correctly when the isolation level for transaction is set to repeatable_read or serializable.
    Example
    SQL statement for query: SELECT * FROM table WHERE processed = 0;
    SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
    processed is the indicator in the database.</b></i>
    try with repeatable_read or serializable !!!
    Also go thru this thread - DELETE Querey in JDBC SENDER

  • Select the progress of an another sql statement

    What I want to do is to monitor the progress of a sql statement which takes a long time. How many percent of the statement is already done.
    I know there is the possibility to do this with a query.
    But I can' t remember how to do this exactly.
    Can somebody help me?
    Thanks a lot!

    Here is a SELECT that I usually run:
    COLUMN MODULE FOR A20
    COLUMN OPNAME FOR A20
    COLUMN SOFAR FOR 999999999999
    COLUMN TOTALWORK FOR 999999999999
    COLUMN UNITS FOR A20
    COLUMN REMAINING FOR 999999999
    COLUMN ELAPSED FOR 999999999
    SELECT
               S.SID
              ,S.AUDSID
              ,S.OSUSER
              ,S.MODULE
              ,L.OPNAME
              -- ,TARGET                
              -- ,TARGET_DESC           
              -- ,CONTEXT               
              ,L.SOFAR
              ,L.TOTALWORK
              ,L.UNITS
              ,L.START_TIME            
              ,L.LAST_UPDATE_TIME
              ,L.TIME_REMAINING REMAINING
              ,L.ELAPSED_SECONDS ELAPSED
              -- ,MESSAGE               
              -- ,USERNAME              
              ,L.SQL_ADDRESS
              -- ,SQL_HASH_VALUE        
              -- ,QCSID       
              -- ,A.SQL_TEXT
         FROM V$SESSION_LONGOPS L
              ,V$SESSION S
              -- , V$SQLAREA A
         WHERE L.TIME_REMAINING <> 0
              AND L.SID = S.SID
              AND L.SERIAL# = S.SERIAL#
    ;Note that V$SESSION_LONGOPS as a rule does not show long operations which take a lot of index range scans - this is not a "long operation"

  • How to check the progress of a BPM process I started ?

    Hi,
    I used to build workflow with Guided Procedure, and there is a GP Runtime Workcenter where a user can find the processes he/she started, or being as an admin/overseer/owner. For GP, it is much more powerful than UWL.
    Now I'm testing BPM with the following secnario, but I don't know how the user starting a process to monitor the progress with UWL ? (I do not think NWA is a good tool for BPM user, correct me if I'm wrong )
    My scenario is : User fill in a leave-request data form built with Web Dynpro iView (not part of BPM task), and click submit, the iView start a BPM process. This process will go through the approvers. The user need to check the progress.....how can he/she find the process in UWL ? (He/She has no working items)
    I really want to know the best practice to present the process prgress to a user who is relative to the process instances (as initiator, admin, or participant)
    Thanks

    Hi,
    You can do it several ways.
    1> a) After starting the process, go to NWA [http://<hostname>:<port>/nwa]
         b) Go to 'Operations' -> Processes and Tasks' -> 'Manage Process'.
         c) Choose the Process instance you started and click on the 'Process flow'.
    This will show you a page with the process digram with a grenn 'token' beside the active step.
    2> The other way ( dificult to achieve, easier to use)
         a> During  process design, for every human activity UI, write down the process steps on task UI.
         b> Highlight the step  for every human task.
         c> When the user opens the tak UI from UWL, then can see the process step at which they are stuck.
      This method wont work if the process is stuck at any 'automated activity' or sub-process.
    Hope these help.
    Edited by: Subhra Jyoti Saha on Jul 6, 2010 7:04 AM

  • How do you monitor backup progress

    How can you monitor the progress of a backup? I use timemachine and an external drive  to do my backups on my 09 Macbook pro. I want to be able to see the amount of files transferred and time remaining or any other pertinent info. Not just a spinning wheel.

    I don't know, I use bootable clones myself and it shows me the progress of the backup and updating of files.
    However I can point you to this guy who is the local TM guru
    All about Time Machine
    If you want to learn more about all sorts of backups to diversify your restore options (TM can fail to restore properly), including bootable clones etc. then read my UT here on the subject.
    Most commonly used backup methods explained
    I personally don't use TimeMachine, preferring the more advanced bootable clone options.

  • On performing continuous delete operation database hangs

    Dear All,
    On performing continuous delete operation , the instance on which delete operation is performed database hangs i.e it does not allows to make new connection and some times on alert log we get ORA-3136 error
    Database version 10.2.0.3 , OS : HP-UXvi3
    Regards

    Refer this thread
    ORA-3136 while performing bulk delete

  • How to check the progress of statistics gathering on a table?

    Hi,
    I have started the statistics gathering on a few big tables in my database.
    How to check the progress of statistics gathering on a table? Is there any data dictionary views or tables to monitor the progress of stats gathering.
    Regds,
    Kunwar

    Hi all
    you can check with this small script.
    it lists the sid details for long running session like
    when it started
    when last update
    how much time still left
    session status "ACTIVE/INACTIVE". etc.
    -- Author               : Syed Kaleemuddin_
    -- Script_name          : sid_long_ops.sql
    -- Description          : list the sid details for long running session like when it started when last update how much time still left.
    set lines 200
    col OPNAME for a25
    Select
    a.sid,
    a.serial#,
    b.status,
    a.opname,
    to_char(a.START_TIME,' dd-Mon-YYYY HH24:mi:ss') START_TIME,
    to_char(a.LAST_UPDATE_TIME,' dd-Mon-YYYY HH24:mi:ss') LAST_UPDATE_TIME,
    a.time_remaining as "Time Remaining Sec" ,
    a.time_remaining/60 as "Time Remaining Min",
    a.time_remaining/60/60 as "Time Remaining HR"
    From v$session_longops a, v$session b
    where a.sid = b.sid
    and a.sid =&sid
    And time_remaining > 0;
    Sample output:
    SQL> @sid_long_ops
    Enter value for sid: 474
    old 13: and a.sid =&sid
    new 13: and a.sid =474
    SID SERIAL# STATUS OPNAME START_TIME LAST_UPDATE_TIME Time Remaining Sec Time Remaining Min Time Remaining HR
    474 2033 ACTIVE Gather Schema Statistics 06-Jun-2012 20:10:49 07-Jun-2012 01:35:24 572 9.53333333 .158888889
    Thanks & Regards
    Syed Kaleemuddin.
    Oracle Apps DBA
    Mobile: +91 9966270072
    Email: [email protected]

  • Does DELETE operation frees up space

    Hi,
    Does DELETE on some rows of a table also free up space on the tablespace.
    If no, how to actually free up the tablespace occupied memory in the tablespace after a delete operation.
    Thanks,
    Himadri

    > Rows with a specific condition should be removed and the space
    should be freed up. That is what i am looking for.
    Oracle does not work like that. For good (performance related) reasons.
    Oracle has "percentage used" and "percentage free" space parameters. These you/the DBA need to tune for the optimal balance between performance and space utilisation.
    These percentages serve as low- and high-water marks. When there are data above the high water mark, the block is removed from the free list (free list = blocks with sufficient space for more rows to be added to the block).
    When the data in a non-free blocks drop below the low water mark, that block is moved back to the free list.
    When you delete data, the blocks affected will free space. However, if the current space used of these affected blocks does not drop below the set low water mark, these blocks will not be moved to the free list.
    When dealing with large table and deleting rows, you'll often find that no space has been released. The number of rows deleted are scattered across so many disctinct blocks, that the delete did not free sufficient space in any of these blocks to result in them moving to the free list.

  • The first binary file write operation for a new file takes progressively longer.

    I have an application in which I am acquiring analog data from multiple
    PXI-6031E DAQ boards and then writing that data to FireWire hard disks
    over an extended time period (14 days).  I am using a PXI-8145RT
    controller, a PXI-8252 FireWire interface board and compatible FireWire
    hard drive enclosures.  When I start acquiring data to an empty
    hard disk, creating files on the fly as well as the actual file I/O
    operations are both very quick.  As the number of files on the
    hard drive increases, it begins to take considerably longer to complete
    the first write to a new binary file.  After the first write,
    subsequent writes of the same data size to that same file are very
    fast.  It is only the first write operation to a new file that
    takes progressively longer.  To clarify, it currently takes 1 to 2
    milliseconds to complete the first binary write of a new file when the
    hard drive is almost empty.  After writing 32, 150 MByte files,
    the first binary write to file 33 takes about 5 seconds!  This
    behavior is repeatable and continues to get worse as the number of
    files increases.  I am using the FAT32 file system, required for
    the Real-Time controller, and 80GB laptop hard drives.   The
    system works flawlessly until asked to create a new file and write the
    first set of binary data to that file.  I am forced to buffer lots
    of data from the DAQ boards while the system hangs at this point. 
    The requirements for this data acquisition system do not allow for a
    single data file so I can not simply write to one large file.  
    Any help or suggestions as to why I am seeing this behavior would be
    greatly appreciated.

    I am experiencing the same problem. Our program periodically monitors data and eventually save it for post-processing. While it's searching for suitable data, it creates one file for every channel (32 in total) and starts streaming data to these files. If it finds data is not suitable, it deletes the files and creates new ones.
    On our lab, we tested the program on windows and then on RT and we did not find any problems.
    Unfortunately when it was time to install the PXI on field (an electromechanic shovel on a copper mine) and test it, we've come to find that saving was taking to long and the program screwed up. Specifically when creating files (I.E. "New File" function). It could take 5 or more seconds to create a single file.
    As you can see, field startup failed and we will have to modify our programs to workaround this problem and return next week to try again, with the additional time and cost involved. Not to talk about the bad image we are giving to our costumer.
    I really like labview, but I am particularly upset beacuse of this problem. LV RT is supposed to run as if it was LV win32, with the obvious and expected differences, but a developer can not expect things like this to happen. I remember a few months ago I had another problem: on RT Time/Date function gives a wrong value as your program runs, when using timed loops. Can you expect something like that when evaluating your development platform? Fortunately, we found the problem before giving the system to our costumer and there was a relatively easy workaround. Unfortunately, now we had to hit the wall to find the problem.
    On this particular problem I also found that it gets worse when there are more files on the directory. Create a new dir every N hours? I really think that's not a solution. I would not expect this answer from NI.
    I would really appreciate someone from NI to give us a technical explanation about why this problem happens and not just "trial and error" "solutions".
    By the way, we are using a PXI RT controller with the solid-state drive option.
    Thank you.
    Daniel R.
    Message Edited by Daniel_Chile on 06-29-2006 03:05 PM

  • Hi there, Wondering if you might know?  I don't have enough space to update the new software on iPad.  So my facetime isn't working anymore, this is prob why. Seems I have to delete like all the games/apps we have to do so.  Will I lose the progress data/

    Hi there,
    Wondering if you might know?  I don't have enough space to update the new software on iPad.  So my facetime isn't working anymore, this is prob why. Seems I have to delete like all the games/apps we have to do so.  Will I lose the progress data/levels in the games? But how do I back up the games data?
    Please help.  Scared to delete them to update and then not have the space to restore them and if I get them again will the levels/progress be gone?
    Thanks Rachel

    Connect your device to iTunes and do the update through iTunes. Using a computer takes much less space on your device than doing the update on your device.

Maybe you are looking for