Re: Performance bottleneck due to array manipulation

Поиск
Список
Период
Сортировка
От Félix GERZAGUET
Тема Re: Performance bottleneck due to array manipulation
Дата
Msg-id CANVwZtvhJby1fXADCwV09Ypy9yvwaBQ_i0OFkriAAjcbUjU+8A@mail.gmail.com
обсуждение исходный текст
Ответ на Performance bottleneck due to array manipulation  (Genc, Ömer <Oemer.Genc@iais.fraunhofer.de>)
Список pgsql-performance
Hello,

On Fri, Aug 21, 2015 at 2:48 PM, Genc, Ömer <Oemer.Genc@iais.fraunhofer.de> wrote:

Now I want to delete all entries from ims_point, where the timestamp is older than one hour. The currently being referenced ids of the table ims_object_header should be excluded from this deletion.

 


delete from public.ims_point ip
  where ip.timestamp < current_timestamp - interval '1 hour'
    and not exists ( select 'reference exists'
                       from public.ims_object_header ioh
                      where ioh.last_point_id = ip.point_id
                     )
;

Does this works for you ?

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance bottleneck due to array manipulation
Следующее
От: Igor Neyman
Дата:
Сообщение: Re: Performance bottleneck due to array manipulation