From: Josh Berkus <josh@agliodbs.com>
To: Yusuf <yusuf0478@netscape.net>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Enabling and disabling run time configuration parameters.
Date: Thu, 5 Jun 2003 09:19:10 -0700
Message-ID: <200306050919.10717.josh@agliodbs.com> (raw)
In-Reply-To: <3EDF633A.8000502@netscape.net>
References: <3EDF633A.8000502@netscape.net>
Yusuf,
> Is it a good idea, to temporarily adjust those values before running a
> query to spend up the execution time? I've searched online and wasn't
> able to find articles about it.
No. The "enable_%" vars are intended as settings for *testing*, to tell you
if you have a problem with your query structure or indexing, cost variables,
or are in need of a VACUUM. Using them in a production capacity is a bad
idea, because you haven't addressed the problem that was causing the query to
be slow in the first place, and as your database changes over time your
queries will become slow again.
Adhjusting the *cost* variables is a good idea. Find you need
ENABLE_SEQSCAN=FALSE a lot? Raise your cache_size and lower your
random_tuple_cost variables, among other adjustments.
For further adjustments, post some of your "bad queries" to this list. Be
sure to include *all* of the following:
1) VACUUM FULL ANALYZE before testing.
2) Include the full query.
3) Include the EXPLAIN ANALYZE results of the query.
4) Include (possibly as a text attachment) the schema of relevant tables,
including (especially!) indexes.
--
Josh Berkus
Aglio Database Solutions
San Francisco
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, yusuf0478@netscape.net
Subject: Re: Enabling and disabling run time configuration parameters.
In-Reply-To: <200306050919.10717.josh@agliodbs.com>
References: <3EDF633A.8000502@netscape.net> <200306050919.10717.josh@agliodbs.com>
* 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