| От | Tom Lane |
|---|---|
| Тема | Re: Delete query takes exorbitant amount of time |
| Дата | |
| Msg-id | 3750.1111715318@sss.pgh.pa.us обсуждение |
| Ответ на | Delete query takes exorbitant amount of time (Karim Nassar <Karim.Nassar@acm.org>) |
| Ответы |
Re: Delete query takes exorbitant amount of time
Re: Delete query takes exorbitant amount of time |
| Список | pgsql-performance |
Karim Nassar <karim.nassar@NAU.EDU> writes:
>> Look at what your triggers are doing. My private bet is that you have
>> unindexed foreign keys referencing this table, and so each deletion
>> forces a seqscan of some other, evidently very large, table(s).
> Almost. I have a large table (6.3 million rows) with a foreign key
> reference to this one (which has 749 rows), however it is indexed.
In that case there's a datatype mismatch between the referencing and
referenced columns, which prevents the index from being used for the
FK check.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера