Re: How to delete duplicate rows?

Поиск
Список
Период
Сортировка
От John Sidney-Woollett
Тема Re: How to delete duplicate rows?
Дата
Msg-id 42034DFE.6060502@wardbrook.com
обсуждение исходный текст
Ответ на How to delete duplicate rows?  (Clodoaldo Pinto <clodoaldo.pinto@gmail.com>)
Ответы Re: How to delete duplicate rows?  (Clodoaldo Pinto <clodoaldo.pinto@gmail.com>)
Список pgsql-general
Doh, sorry - you're completely correct! Silly me...

Can you not add a serial or sequence column to the table for the
purposes of the de-dupe?

Then create an index on that column in one operation at the end and use
that in the way that you would use Oracle's rowid from the examples?

John Sidney-Woollett


Clodoaldo Pinto wrote:

> On Fri, 04 Feb 2005 07:38:26 +0000, John Sidney-Woollett
> <johnsw@wardbrook.com> wrote:
>
>>Can you not use your table's primary key value instead?
>>
>
> John, If a primary key existed there would be no duplicates.
>
> The row insertion is made in 650k rows batches 8 times a day and a
> primary key make it very slow.
>
> Found also methods 2 and 3 in
> http://www.orafaq.com/faq/Server_Utilities/SQL/faq55.htm
>
> Method 3 also relies in the row id. If no one can help I will do this:
>
> Insert the distinct rows in a temporary table. Drop the index. Insert
> into the original from the temporary.
>
> Clodoaldo

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: pgpool 2.5b2 released
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: Invalid headers and xlog flush failures