Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: trouble with an SQL statement

Re: trouble with an SQL statement

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 7 Apr 2005 15:29:55 -0700
Message-ID: <1112912995.145557.9860@l41g2000cwc.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US