From: Mark Stosberg <mark@summersault.com>
To: pgsql-performance@postgresql.org
Subject: Using statement_timeout as a performance tool?
Date: Thu, 01 Feb 2007 09:10:09 -0500
Message-ID: <epssco$jes$1@sea.gmane.org> (raw)
Hello,
I'm working on setting up replication with Slony, and will soon have a
slave that a lot of SELECT traffic will be sent to (over 500k/day).
The primary query we need to run is somewhat complex, but seems to
complete on average in well under a second.
However, every so often (less in 1 in 10,000 queries) we'll see the
query take 2 or 3 minutes.
It's not clear why this is happening-- perhaps there is something else
going on that is affecting this query.
I'm considering the use of "statement_timeout" to limit the time of
this particular query, to suppress the rare "run away", and avoid tying
up the processor for that additional time.
I think it may be better to give up, quit spending cycles on it right
then, and return an "oops, try again in a few minutes" message instead.
From the data we have, seems like it has a strong chance of working again.
Is anyone else using "statement_timeout" as part of an overall
performance plan?
Mark
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: mark@summersault.com
Subject: Re: Using statement_timeout as a performance tool?
In-Reply-To: <epssco$jes$1@sea.gmane.org>
* 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