Skip site navigation (1) Skip section navigation (2)

Re: Very long deletion time on a 200 GB database

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: "Reuven M(dot) Lerner" <reuven(at)lerner(dot)co(dot)il>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Very long deletion time on a 200 GB database
Date: 2012-02-24 13:07:00
Message-ID: CAGTBQpbC=x11DmRtVTAe-LaypODEkwfrQCacGiFSKWX_CjFhWQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Fri, Feb 24, 2012 at 9:37 AM, Reuven M. Lerner <reuven(at)lerner(dot)co(dot)il> wrote:
> I just checked, and work_mem is set to 30 MB.  That seems a bit low to me,
> given the size of the database and the fact that we're doing so much sorting
> and subselecting.  Am I right that we should push that up some more?

You can certainly increase work_mem **for the delete** (which you can
do by issuing "set work_mem='something'" just before the delete - it
will only apply to that connection), but bear in mind that work_mem is
the amount of memory each connection can use for each operation. Total
usage can go way higher than max_connections * work_mem, depending on
the kind of queries you have.

In response to

pgsql-performance by date

Next:From: Shaun ThomasDate: 2012-02-24 14:34:06
Subject: Re: Very long deletion time on a 200 GB database
Previous:From: Reuven M. LernerDate: 2012-02-24 12:37:30
Subject: Re: Very long deletion time on a 200 GB database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group