| От | Matthias Karlsson |
|---|---|
| Тема | Slow delete with with cascading foreign keys |
| Дата | |
| Msg-id | 83eb635f0810200546ta5798d1n45b3c03322099fd@mail.gmail.com обсуждение |
| Ответы |
Re: Slow delete with with cascading foreign keys
|
| Список | pgsql-general |
Hi, I have a rather complex set of relations, connected with cascading foreign keys on delete. I'm experiencing very slow performance when deleting *the* lead node, which everything eventually depends on. The number of records ultimately to be deleted aren't that many (perhaps 2000-3000) but there are maybe 30 relations involved. I understand that this is most likely due to missing indices, but I have been unable to figure out how to get PostgreSQL to tell me where the performance bottleneck is. Say my simple query looks like "delete from foo where id = 1". An "explain" on this won't yield any information for example. Is there any way to get PostgreSQL to do an analys of a delete statement like the way I need? // Matthias
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера