From: lucas@presserv.org
To: pgsql-sql@postgresql.org
Subject: Re: Duplicated records
Date: Wed, 25 May 2005 17:53:56 -0300
Message-ID: <20050525175356.s6rowsmck8e888s8@www.presserv.org> (raw)
In-Reply-To: <4294B149.3040207@PresiNET.com>
References: <20050524175931.4dp41vy7v10c4wc4@www.presserv.org>
<20050525050346.GA29126@webserv.wug-glas.de>
<20050525135807.x9p08co04v8gg0cw@www.presserv.org>
<4294B149.3040207@PresiNET.com>
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;
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lucas@presserv.org
Subject: Re: Duplicated records
In-Reply-To: <20050525175356.s6rowsmck8e888s8@www.presserv.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox