Re: Deleting 173000 records takes forever, blocks async queries for unrelated records

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deleting 173000 records takes forever, blocks async queries for unrelated records
Date: 2013-02-01 11:30:32
Message-ID: CAADeyWgcFvFLjrFGTcaNpW+vhHoCnguA_AyN1KtqRNMtD+mHyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vlad Bailescu 2013-02-01 11:49:26 Re: Unusually high IO for autovacuum worker
Previous Message Pavan Deolasee 2013-02-01 11:08:43 Re: Unusually high IO for autovacuum worker