Search Postgresql Archives

Re: delete duplicates takes too long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miguel Miranda escribió:
> I cant use a unique index because i only want to check for duplicates where
> processed = 2, for simplicity i did not include that condition in the
> example.

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;

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux