| От | Tom Lane |
|---|---|
| Тема | Re: Cannot Delete |
| Дата | |
| Msg-id | 29783.1063901237@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Cannot Delete (Alex <alex@meerkatsoft.com>) |
| Ответы |
Re: Cannot Delete
|
| Список | pgsql-general |
Alex <alex@meerkatsoft.com> writes:
> hi have a table with 2.5 million records which i try do delete. i have
> several constraints on it too.
> i tried to delete the records using delete but it does not seem to work.
> the delete runs forever. hrs...
> i cannot truncate it as it complains about foreign keys.
It's a good bet that you need to create indexes on the columns that
reference this table via foreign keys. Without such indexes, updates
and deletes on the referenced table will be really slow.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера