Re: Enabling and disabling run time configuration parameters.

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Yusuf <yusuf0478(at)netscape(dot)net>, pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Enabling and disabling run time configuration parameters.
Date: 2003-06-05 16:19:10
Message-ID: 200306050919.10717.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Sullivan 2003-06-05 16:39:34 Re: Enabling and disabling run time configuration parameters.
Previous Message Bruno Wolff III 2003-06-05 16:15:02 Re: Enabling and disabling run time configuration parameters.