Re: delete duplicates takes too long

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: delete duplicates takes too long
Дата
Msg-id 20090425005117.GW10358@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: delete duplicates takes too long  (Miguel Miranda <miguel.mirandag@gmail.com>)
Ответы Re: delete duplicates takes too long  (Dennis Brakhane <brakhane@googlemail.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Miguel Miranda
Дата:
Сообщение: Re: delete duplicates takes too long
Следующее
От: pavunkumar
Дата:
Сообщение: Re: deleting function