pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Yusuf <yusuf0478@netscape.net>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Enabling and disabling run time configuration parameters.
Date: Thu, 5 Jun 2003 11:15:02 -0500
Message-ID: <20030605161502.GA22114@wolff.to> (raw)
In-Reply-To: <3EDF633A.8000502@netscape.net>
References: <3EDF633A.8000502@netscape.net>

On Thu, Jun 05, 2003 at 11:35:22 -0400,
  Yusuf <yusuf0478@netscape.net> wrote:
> I have discovered that I could optimize queries by adjusting the 
> following parameters such as enable_seqscan, enable_hashjoin, 
> enable_mergejoin and enable_nestloop.
> 
> 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.

That is a reasonable thing to do. However you should also look into
adjusting some of the costs used by the planner so that it gets the
right plan more often. If you manually hack how the query is done,
then you have to worry about whether the hack is still right if the
the data changes significantly.

> I need to speed up an enterprise application that I'm working on, and I 
> wouldn't want to screw things up.

There worst that would happen is that the plan you forced it to use
was slower than what the planner would have used.

> My plan is for every query that could be optimized by adjusting 
> parameters: I'll enable parameters that'll speed it up, run the query, 
> then set the parameters back to their default values.

They only apply to the current backend session. You can also set them
for just the current transaction which is safer if you are using persistant
backend connections. (So that if you make a mistake the setting doesn't
apply for a very long time.)



view thread (6+ messages)  latest in thread

Message-ID: <20030605161502.GA22114@wolff.to>
Permalink:  ../20030605161502.GA22114@wolff.to/
Also on:    postgresql.org/message-id/20030605161502.GA22114@wolff.to

 · 

reply

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: bruno@wolff.to, yusuf0478@netscape.net
  Subject: Re: Enabling and disabling run time configuration parameters.
  In-Reply-To: <20030605161502.GA22114@wolff.to>
  References: <3EDF633A.8000502@netscape.net> <20030605161502.GA22114@wolff.to>

* 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