Thanks, I will add an index(id, yw) and check. The limit suggestion (yes, I already have a "vacuum" cronjob to purge spam-users from drupal_users etc.) doesn't work: # delete from pref_users where id not in (select distinct id from pref_money) limit 10; ERROR: syntax error at or near "limit" LINE 2: ...ere id not in (select distinct id from pref_money) limit 10; -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general