Re: How to delete duplicate rows?
| От | Clodoaldo Pinto |
|---|---|
| Тема | Re: How to delete duplicate rows? |
| Дата | |
| Msg-id | a595de7a05020403115d1ee410@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: How to delete duplicate rows? (John Sidney-Woollett <johnsw@wardbrook.com>) |
| Список | pgsql-general |
<johnsw@wardbrook.com> wrote: > > 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? Yes. It could work. I have a two hours window to do it. Creating the index alone takes about one hour... > Clodoaldo Pinto wrote: > > > 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. > > How did i wrote it? The correct is: Insert the distinct rows in a temporary table. Truncate the original. Drop the index. Insert into the original from the temporary. Recreate the index. Clodoaldo
В списке pgsql-general по дате отправления: