Re: Same stament sometime fast, something slow

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <fernando(dot)mertins(at)gmail(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Same stament sometime fast, something slow
Date: 2011-01-04 18:12:45
Message-ID: 4D230EBD0200002500038FBB@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Fernando Mertins wrote:

> I have a PostgreSQL 8.3.6

You should consider upgrading to the latest minor release:

http://www.postgresql.org/support/versioning

http://www.postgresql.org/docs/8.3/static/release.html

> My question is, this same query executes many times a day and many
> times fast/normal, but why in some cases its run slowly? Especialy
> because the "CODCURSO" column is PK and this table has only 3
> registers (tiny table).

Two common causes for this are blocking and overloading the I/O
system at checkpoint. You might want to turn on logging of
checkpoints to see if this happens only during checkpoints. See this
page for techniques to look at blocking:

http://wiki.postgresql.org/wiki/Lock_Monitoring

If neither of these helps, please review this page and post again
with more details:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

-Kevin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ben Chobot 2011-01-04 18:36:53 Re: Question: BlockSize > 8192 with FusionIO
Previous Message Fernando Mertins 2011-01-04 18:03:03 Same stament sometime fast, something slow