Slow delete

Поиск
Список
Период
Сортировка
От Doug Hall
Тема Slow delete
Дата
Msg-id b159536fed69b369c938d44e414f6321@gmail.com
обсуждение исходный текст
Ответы Re: Slow delete  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Sorry. I realize this is a rather newbie question, but I've got a slow
delete going on here, and I could use some help figuring out why. This
is the classic "get rid of orphans" select.

delete from citizen where id not in (select citizenid from
citizen_stage);

citizen.id and citizen_stage.citizenid are both indexed.

The explain select tells me that there is a sequential select of
citizen_stage records. (??) There are 75009 citizen records and 14778
records, and it's taking more than half an hour. How can I speed this
up?

Thanks,
Doug


В списке pgsql-general по дате отправления:

Предыдущее
От: Bob
Дата:
Сообщение: Re: Client-Server Example
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: chosing a database name