Re: Tuning resource parameters for a logging database. - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Tuning resource parameters for a logging database.
Date
Msg-id dcc563d10905211239v22d4563el1267ae954a79ef1f@mail.gmail.com
Whole thread Raw
In response to Re: Tuning resource parameters for a logging database.  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
On Thu, May 21, 2009 at 1:36 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
>

Below, I meant with a logging / reporting database...

> With a logging database you're optimizing two often opposing actions.
> Lots of small inserts in a stream that HAVE to get processed and put
> in efficiently.  This is often accomplished with minimum
> shared_buffers and work_mem, because there's no need for the overhead
> of large shared_buffers and insert queries for logging dbs don't need
> much work_mem.
>
> With a reporting database you run queries that chew up tons of memory
> both shared_buffers and work_mem for efficient operation.
>

>> work_mem = 128MB
>
> Bigger than needed for logging, good for reporting.  You can probably
> just leave it.

Note that you can set work_mem per user, so have the reporting users
log in with a different user and you can crank this up a bit, say 512M
to 1G if you're only ever running 1 or 2 reports.  Careful about
running the machine out of memory, work_mem is a foot gun if you set
it too high and run a lot of queries at once.

pgsql-general by date:

Previous
From: Alex Thurlow
Date:
Subject: Re: Tuning resource parameters for a logging database.
Next
From: Scott Marlowe
Date:
Subject: Re: Tuning resource parameters for a logging database.