From: Andreas Kretschmer <akretschmer@despammed.com>
To: pgsql-sql@postgresql.org
Subject: Re: [despammed] Re: Duplicated records
Date: Wed, 25 May 2005 19:57:02 +0200
Message-ID: <20050525175702.GA3389@webserv.wug-glas.de> (raw)
In-Reply-To: <20050525135807.x9p08co04v8gg0cw@www.presserv.org>
References: <20050524175931.4dp41vy7v10c4wc4@www.presserv.org>
<20050525050346.GA29126@webserv.wug-glas.de>
<20050525135807.x9p08co04v8gg0cw@www.presserv.org>
am 25.05.2005, um 13:58:07 -0300 mailte lucas@presserv.org folgendes:
> Hi.
> Thanks for the article...
> But, I have read it and the query works very slow...
> My table have aprox. 180.000 records (correct) and in entire table it has
> aprox.360.000 records(duplicated)...
How often is this necessary?
> Is there a way to delete those duplicated records faster??? Remembering the
> table have aprox 360.000 records...
I dont know, but i think, you should prevent duplicated records in the
future, and make the job (delete duplicates) now.
Btw.: you wrote, there is a primary key on the first row. Real?
,----[ sorry, messages in german language ]
| test_db=# create table blub (id int primary key, name varchar);
| HINWEIS: CREATE TABLE / PRIMARY KEY erstellt implizit einen Index >>blub_pkey<< für Tabelle >>blub<<
| CREATE TABLE
| test_db=# insert into blub values (1, 'x');
| INSERT 970706 1
| test_db=# insert into blub values (1, 'y');
| FEHLER: duplizierter Schlüssel verletzt Unique-Constraint >>blub_pkey<<
`----
In other words: if there a primary key on the first row, you cannot
insert duplicates.
Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
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: akretschmer@despammed.com
Subject: Re: [despammed] Re: Duplicated records
In-Reply-To: <20050525175702.GA3389@webserv.wug-glas.de>
* 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