Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: trouble with an SQL statement
If you can easily identify the rows you want to keep and you have
exclusive access to the table then why not use a Create Table As Select
of the rows you want, truncate the original table, and then reinsert
the CTAS'd rows back.
The above method would probably be much faster than say deleting where the rowid in not in a group by subselect where you select the min(timestamp) row grouped by the key columns and description.
HTH -- Mark D Powell -- Received on Thu Apr 07 2005 - 17:29:55 CDT