Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)
Дата
Msg-id CAOR=d=1jF7t1LKnAknrpSnXr_jF-MvVv6M0mT3paWdRob+5z_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)  (Andy Colson <andy@squeakycode.net>)
Ответы Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
If you're de-duping a whole table, no need to create indexes, as it's
gonna have to hit every row anyway. Fastest way I've found has been:

select a,b,c into newtable from oldtable group by a,b,c;

On pass, done.

If you want to use less than the whole row, you can use select
distinct on (col1, col2) * into newtable from oldtable;


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

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)