Re: Same stament sometime fast, something slow - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Same stament sometime fast, something slow
Date
Msg-id 4D230EBD0200002500038FBB@gw.wicourts.gov
Whole thread Raw
In response to Same stament sometime fast, something slow  (Fernando Mertins <fernando.mertins@gmail.com>)
Responses Re: Same stament sometime fast, something slow
List 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

pgsql-performance by date:

Previous
From: Fernando Mertins
Date:
Subject: Same stament sometime fast, something slow
Next
From: Ben Chobot
Date:
Subject: Re: Question: BlockSize > 8192 with FusionIO