could not create unique index, table contains duplicated values
В списке pgsql-novice по дате отправления:
| От | Christian Hofmann |
|---|---|
| Тема | could not create unique index, table contains duplicated values |
| Дата | |
| Msg-id | 000a01c5f39b$e1bf2c90$7b00a8c0@taschenrechner обсуждение исходный текст |
| Ответы |
Re: could not create unique index, table contains
|
| Список | pgsql-novice |
Hello, I have a table with two columns (id, names). At this time there is no index, because i have not needed any one. There are about 120 million rows. Now I want to delete all duplicate rows. I thought I could just create a unique index and postgresql qould do the rest. But ok. Maybe postgresql didn't know which rows to delete. Is there a query that will delete all rows where the same name is more than one time in the table? I only want to have every name once in the table. My method to write a programm, select every row and cvompare it to the others would be very slow. There is something with a having statement, but I don't get the clue to build that statement. Can you help me? Thank you very much, Christian
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера