On 2009-10-07, Dave Huber <DHuber(at)letourneautechnologies(dot)com> wrote:
> --_000_7CDADB576E07AC4FA71E1B12566C9126540E0A0C34ltimb1LTIcom_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> A colleague gave me the following query to run:
>
> DELETE FROM data_log_20msec_table WHERE (log_id IN (SELECT log_id FROM data=
> _log_20msec_table ORDER BY log_id DESC OFFSET 10000000))
looks slower than neccessary.
DELETE FROM data_log_20msec_table WHERE log_id < (SELECT log_id FROM
data= _log_20msec_table ORDER BY log_id DESC OFFSET 10000000 LIMIT 1 )