From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> |
Cc: | ivo liondov <ivo(dot)liondov(at)gmail(dot)com>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: delete taking long time |
Date: | 2016-03-16 01:25:59 |
Message-ID: | CAKFQuwabVq-+=Nuaz=0znvzVKAW_TzKFwtdcwrSGXN-bBdt9Gg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tuesday, March 15, 2016, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:
> On Tuesday, March 15, 2016, Andreas Kretschmer <andreas(at)a-kretschmer(dot)de
> <javascript:_e(%7B%7D,'cvml','andreas(at)a-kretschmer(dot)de');>> wrote:
>
>>
>> >
>> > I am trying to delete the connections with date 2016-03-10 by using the
>> > following:
>> >
>> >
>> > delete from connection where uid in (select uid from connection where
>> ts >
>> > '2016-03-10 00:30:00');
>>
>> try to rewrite that to :
>>
>> delete from connection where ts > '2016-03-10 00:30:00';
>>
>> It's simpler - and (maybe) faster.
>>
>>
>>
> It also gives a different answer...
>
>
Never mind...the PK makes them equivalent.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2016-03-16 01:34:52 | Re: delete taking long time |
Previous Message | David G. Johnston | 2016-03-16 01:24:41 | Re: delete taking long time |