Re: Duplicated records - Mailing list pgsql-sql

From lucas@presserv.org
Subject Re: Duplicated records
Date
Msg-id 20050525175356.s6rowsmck8e888s8@www.presserv.org
Whole thread Raw
In response to Duplicated records  (lucas@presserv.org)
Responses Re: Duplicated records  (Andrew Hammond <ahammond@ca.afilias.info>)
List pgsql-sql
Thanks....
CTAS (Create Table As Select) command works fine!!! With great performance.
I think it is the best way to correct the data...(apparently)
I didnt know about "select DISTINCT". I am going to read about it.

Thank you.

Quoting Bricklen Anderson <BAnderson@PresiNET.com>:
>> Is there a way to delete those duplicated records faster??? Remembering the
>> table have aprox 360.000 records...
>> Is better I create other table and copy those data??? How should I 
>> created???
>>
> for 180k rows (which isn't many) just do a CTAS (Create Table As Select):
>
> create table lanctos_distinct as select distinct * from lanctos;
> truncate table lanctos;
> alter table lanctos_distinct rename to lanctos;
>



pgsql-sql by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: [despammed] Re: Duplicated records
Next
From: Tom Lane
Date:
Subject: Re: Sql select like question.