X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 8080AEFF46 for ; Thu, 5 Jun 2003 16:20:33 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 25510-03 for ; Thu, 5 Jun 2003 16:20:32 +0000 (GMT) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by svr1.postgresql.org (Postfix) with ESMTP id A31A9EFEC4 for ; Thu, 5 Jun 2003 16:20:31 +0000 (GMT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3094529; Thu, 05 Jun 2003 09:20:32 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: Yusuf , pgsql-performance Subject: Re: Enabling and disabling run time configuration parameters. Date: Thu, 5 Jun 2003 09:19:10 -0700 User-Agent: KMail/1.4.3 References: <3EDF633A.8000502@netscape.net> In-Reply-To: <3EDF633A.8000502@netscape.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200306050919.10717.josh@agliodbs.com> X-Archive-Number: 200306/21 X-Sequence-Number: 2105 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