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: (view raw, whole thread or download thread mbox)
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-2017 The PostgreSQL Global Development Group