| От | Harald Fuchs |
|---|---|
| Тема | Re: on update / on delete performance of foreign keys |
| Дата | |
| Msg-id | puk6q27m7i.fsf@srv.protecting.net обсуждение исходный текст |
| Ответ на | on update / on delete performance of foreign keys ("Florian G. Pflug" <fgp@phlo.org>) |
| Ответы |
Re: on update / on delete performance of foreign keys
|
| Список | pgsql-general |
In article <41F5088D.8060702@phlo.org>, "Florian G. Pflug" <fgp@phlo.org> writes: >> PostgreSQL doesn't automatically add indexes to foreign-key >> columns. That sounds like the issue to me. > Oh... *feeling a bit stupid*... Seems that I got confused, because it > requires an index to exist on the referenced table (To speed up inserts, > updates), but not on the referencing table... That's not quite right. What PostgreSQL (or any other DBMS) requires from the referenced table is a UNIQUE constraint on the column in question so that the referencing table points to a single row, and UNIQUE constraints are usually implemented by indices.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера