| От | Worky Workerson |
|---|---|
| Тема | Re: DELETE eats up all memory and crashes box |
| Дата | |
| Msg-id | ce4072df0610061223q16a76ae7sd394762f9ef6ada4@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: DELETE eats up all memory and crashes box (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
> Note that whether you have CASCADE or not is not the issue --- if you > are doing a delete in a foreign-key-referenced relation at all, you > are going to have a trigger event per deleted row no matter what the > details of the FK are. So the best/fastest* way to do this would be to remove the FK relationship from the tables, delete all my rows with DELETE ... WHERE ip IN (SELECT ...) in the previously FK-ed tables, delete all the rows in the PK table, then recreate the FK relationships? I tried this and it was pretty snappy, assuming that all the indexes are built. *note: loading/creating a datawarehouse, guaranteed exclusive access. Current DW size is about 10 GB.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера