Re: Enabling and disabling run time configuration parameters. - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Enabling and disabling run time configuration parameters.
Date
Msg-id 200306050919.10717.josh@agliodbs.com
Whole thread Raw
In response to Enabling and disabling run time configuration parameters.  (Yusuf <yusuf0478@netscape.net>)
List 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

pgsql-performance by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Enabling and disabling run time configuration parameters.
Next
From: Rod Taylor
Date:
Subject: Re: Enabling and disabling run time configuration parameters.