Skip site navigation (1) Skip section navigation (2)

Re: delete duplicates takes too long

From: Dennis Brakhane <brakhane(at)googlemail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Miguel Miranda <miguel(dot)mirandag(at)gmail(dot)com>, mmiranda(at)amnetcorp(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: delete duplicates takes too long
Date: 2009-04-30 17:23:53
Message-ID: 226a19190904301023q6d04da22o624e94fc9680e703@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Sat, Apr 25, 2009 at 2:51 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> In that case you can create a partial unique index:
>
> create index foo on cdr_ama_stat (abonado_a, abonado_b, fecha_llamada,
> duracion) where processed = 2;

Of course, the unique is missing in this one:

CREATE UNIQUE INDEX foo ON cdr_ama_stat (abonado_a, abonado_b, fecha_llamada,
duracion) WHERE processed = 2;

In response to

pgsql-general by date

Next:From: Bill MoseleyDate: 2009-04-30 17:30:26
Subject: Tracking down a deadlock
Previous:From: Keaton AdamsDate: 2009-04-30 16:17:20
Subject: How to begin to debug FATAL: invalid frontend message type 77 error messages?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group