From: | Félix GERZAGUET <felix(dot)gerzaguet(at)gmail(dot)com> |
---|---|
To: | Genc, Ömer <Oemer(dot)Genc(at)iais(dot)fraunhofer(dot)de> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Performance bottleneck due to array manipulation |
Date: | 2015-08-21 14:11:38 |
Message-ID: | CANVwZtvhJby1fXADCwV09Ypy9yvwaBQ_i0OFkriAAjcbUjU+8A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hello,
On Fri, Aug 21, 2015 at 2:48 PM, Genc, Ömer <Oemer(dot)Genc(at)iais(dot)fraunhofer(dot)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 ?
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Neyman | 2015-08-21 14:50:18 | Re: Performance bottleneck due to array manipulation |
Previous Message | Tom Lane | 2015-08-21 14:06:38 | Re: Performance bottleneck due to array manipulation |