| От | Tom Lane |
|---|---|
| Тема | Re: optimizing postgres |
| Дата | |
| Msg-id | 7825.1184290747@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | optimizing postgres (lawpoop@gmail.com) |
| Список | pgsql-general |
lawpoop@gmail.com writes:
> It turned out he was right for our current set up. When I needed to
> empty the project table to re-parse data, doing a cascading delete
> could take up to 10 minutes!
You mean ON CASCADE DELETE foreign keys? Usually the reason that's
slow is you forgot to put an index on the referencing column. PG
doesn't force you to have such an index, but unless the referenced
table is nearly static you'll want one.
I too am fairly suspicious of the N-tables-are-faster-than-another-
key-column mindset, but you'd need to do some actual experimentation
(with correctly optimized table definitions ;-)) to be sure.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера