Re: Checkpoint_segments optimal value

From: Prabhjot Sheena <prabhjot(dot)sheena(at)rivalwatch(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Potentialtech <wmoran(at)potentialtech(dot)com>, Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Checkpoint_segments optimal value
Date: 2014-07-17 18:28:04
Message-ID: CAOf_bQaRBDorZnjhBqM451mmsorac=9LSGP0b5ZNkUP9heo+OQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Thanks i have changed that to 64 and reloaded it.

When i had load issue today there was this exact same query that hits the
db like 50 to 60 times from different machines in 3 to 4 minutes and was
taking long time to execute and was holding up the database. i did recreate
an index and it started performing better. My question is why it is not
fetching the result from the memory since its the same query that runs
again and again.

This is the actual query i m taking about:

SELECT account.id, account.organization_id, run.application_id,
work_unit.script, work_unit.id, work_unit.start_time, run.id,
work_unit.priority FROM work_unit, run, account WHERE work_unit.status =
3 AND work_unit.run_id = run.id AND work_unit.type != 1 AND run.status = 1
AND run.account_id = account.id

Pls suggest if i can do something to fix this

On Thu, Jul 17, 2014 at 11:06 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Potentialtech <wmoran(at)potentialtech(dot)com> writes:
> > If the warning isn't happening too often, I would try increasing it only
> a
> > little and see if it helps. If it's not enough you can then increase it
> some
> > more. Various sources around the Internet suggest that you don't want
> to go
> > much larger than 256 for this (if only because it's uncommon to do so
> and is
> > probably indicative of other tuning that you need to do).
> Unfortunatley, you
> > need to restart PG for the change to take effect, so you have to balance
> > experimenting with your tuning against how often you can get away with a
> server
> > restart.
>
> Huh? You don't need a restart, just a reload (SIGHUP) to change that.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Potentialtech 2014-07-17 18:53:22 Re: Checkpoint_segments optimal value
Previous Message Tom Lane 2014-07-17 18:06:28 Re: Checkpoint_segments optimal value

Browse pgsql-general by date

  From Date Subject
Next Message Potentialtech 2014-07-17 18:53:22 Re: Checkpoint_segments optimal value
Previous Message Tom Lane 2014-07-17 18:06:28 Re: Checkpoint_segments optimal value