Re: What is the fastest way to delete duplicate rows from a table?
Posted in 2000
From: "stumbde" <stumbde@email.msn.com>
>
>For fragmented table use
>
>BEGIN WORK;
>SELECT DISTINCT * FROM Table INTO TEMP Temp1;
>DELETE FROM Table WHERE 1 = 1;
This will be very slow. The drop/recreate table will be *much* faster.
>INSERT INTO Table SELECT * FROM Temp1;>COMMIT WORK;
>
>
>Other Way can be
>create schema for the table using dbschema -d database -t table -ss
>create.sql on unix prompt
>Then run
>SELECT DISTINCT * FROM Table INTO TEMP Temp1;
>Drop table Table>Recreate table using create.sql
>INSERT INTO Table SELECT * FROM Temp1;>
>
>
>Sameer Tumbde
>
>Clifton M. Bean <cmbean@home.com> wrote in message
>news:z_d15.246$x_6.15137@news1.rdc2.tx.home.com...
> > First off, one should always maintain a unique value within a table.
>The
> > reliance on rowid is overused since, as you mention, rowid within a
> > fragmented table is not unique.
> >
> > You can, of course, use the syntax WITH ROWID when you fragment the
>table
>to
> > give it an unique value once again.
> >
> > Take care.
> > Clifton Bean
> >
> >
> > <strangiato@my-deja.com> wrote in message
> > news:8i2v71$80v$1@nnrp1.deja.com...
> > > Online 7.x
> > >
> > > What is the fastest way to delete duplicate rows from a table?
> > >
> > > I don't really want anything that relies on rowids, because the table
> > > may eventually be fragmented.
> > >
> > > Thanks :)
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >
> >
>
>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com