pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Cosimo Streppone <cosimo@streppone.it>
To: Postgresql Performance List <pgsql-performance@postgresql.org>
Subject: Re: Update on high concurrency OLTP application and Postgres
Date: Wed, 20 Sep 2006 14:22:30 +0200
Message-ID: <45113286.2090204@streppone.it> (raw)
In-Reply-To: <20060920110731.GB18219@phlogiston.dyndns.org>
References: <45110543.6020501@streppone.it>
	<20060920110731.GB18219@phlogiston.dyndns.org>

Andrew wrote:

> On Wed, Sep 20, 2006 at 11:09:23AM +0200, Cosimo Streppone wrote:
>> I scheduled a cron job every hour or so that runs an analyze on the
>> 4/5 most intensive relations and sleeps 30 seconds between every
>> analyze.
>
> This suggests to me that your statistics need a lot of updating.

Agreed.

> You _might_ find that setting the statistics to a higher number on some
> columns of some of your tables will allow you to analyse less
> frequently.

At the moment, my rule of thumb is to check out the ANALYZE VERBOSE
messages to see if all table pages are being scanned.

   INFO: "mytable": scanned xxx of yyy pages, containing ...

If xxx = yyy, then I keep statistics at the current level.
When xxx is way less than yyy, I increase the numbers a bit
and retry.

It's probably primitive, but it seems to work well.

 > [...] ANALYSE will impose an I/O load.

In my case, analyze execution doesn't impact performance
in any noticeable way. YMMV of course.

-- 
Cosimo




view thread (5+ messages)  latest in thread

Message-ID: <45113286.2090204@streppone.it>
Permalink:  ../45113286.2090204@streppone.it/
Also on:    postgresql.org/message-id/45113286.2090204@streppone.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: cosimo@streppone.it
  Subject: Re: Update on high concurrency OLTP application and Postgres
  In-Reply-To: <45113286.2090204@streppone.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox