Re: High cost of ... where ... not in (select ...)

От: Tom Lane
Тема: Re: High cost of ... where ... not in (select ...)
Дата: ,
Msg-id: 14283.1245211578@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: High cost of ... where ... not in (select ...)  (Aaron Turner)
Список: pgsql-performance

Скрыть дерево обсуждения

High cost of ... where ... not in (select ...)  (Aaron Turner, )
 Re: High cost of ... where ... not in (select ...)  (Alvaro Herrera, )
  Re: High cost of ... where ... not in (select ...)  (Aaron Turner, )
   Re: High cost of ... where ... not in (select ...)  (Robert Haas, )
    Re: High cost of ... where ... not in (select ...)  (Aaron Turner, )
     Re: High cost of ... where ... not in (select ...)  (Robert Haas, )
      Re: High cost of ... where ... not in (select ...)  (Aaron Turner, )
      Re: High cost of ... where ... not in (select ...)  (Aaron Turner, )
       Re: High cost of ... where ... not in (select ...)  (Tom Lane, )

Aaron Turner <> writes:
> I know the costs are just relative, but I assumed
> cost=19229.08..29478.99 isn't 5 minutes of effort even on crappy
> hardware.

Very likely the bulk of the time is spent in the DELETE work proper,
not in the query to find the rows to be deleted.  In particular I wonder
if you have an unindexed foreign key referencing this table ...

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Alberto Dalmaso
Дата:
Сообщение: Re: Speeding up a query.
От: Heikki Linnakangas
Дата:
Сообщение: Re: GiST index performance