Re: How to reduce impact of a query.

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: "Howard Cole" <howardnews(at)selestial(dot)com>, "Teodor Sigaev" <teodor(at)sigaev(dot)ru>, "PgSql General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to reduce impact of a query.
Date: 2008-11-18 06:26:51
Message-ID: dcc563d10811172226x10b611a6u6a2802919cac3d33@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 17, 2008 at 11:10 PM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au> wrote:

> I also think it's a wee bit of a pity that there's no way to tell Pg
> that a job isn't important, so data shouldn't be permitted to push much
> else out of shared_buffers or the OS's cache. The latter can be ensured
> to an extent, at least on Linux, with posix_fadvise(...,
> POSIX_FADV_NOREUSE) or with madvise(...). The former is presumably
> possible with proper work_mem (etc) settings, but I find it's the OS's
> habit of filling the cache with gigabytes of data I won't need again
> that's the real problem. I don't know how this'd work when interacting
> with other backends doing other work with the same tables, though.

Agreed.

It could be that in the OP's case the data set for the big query is so
big it blows out share_buffers completely / most of the way, and then
I/O for the other data has to hit the drives instead of memory and
that's why they're so slow.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2008-11-18 06:40:23 Re: Using database to find file doublettes in my computer
Previous Message pgsql-general 2008-11-18 06:17:34 Re: Table bloat in 8.3