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 74F2AEFF3C for ; Thu, 5 Jun 2003 16:14:21 +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 25097-02 for ; Thu, 5 Jun 2003 16:14:20 +0000 (GMT) Received: from mailav.tor1.inquent.com (mail.inquent.com [216.208.117.106]) by svr1.postgresql.org (Postfix) with ESMTP id 07E98EFF3A for ; Thu, 5 Jun 2003 16:14:20 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 2BD2E1025C; Thu, 5 Jun 2003 12:08:25 -0400 (EDT) Received: from [10.0.2.10] (unknown [10.0.2.10]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 4C8791024D; Thu, 5 Jun 2003 12:08:23 -0400 (EDT) Subject: Re: Enabling and disabling run time configuration parameters. From: Rod Taylor To: Yusuf Cc: pgsql-performance In-Reply-To: <3EDF633A.8000502@netscape.net> References: <3EDF633A.8000502@netscape.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-SgA/N4Hooa66+N8muCgQ" Organization: Message-Id: <1054829663.7579.38.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 05 Jun 2003 12:14:23 -0400 X-Virus-Scanned: by AMaViS perl-11 X-Archive-Number: 200306/22 X-Sequence-Number: 2106 --=-SgA/N4Hooa66+N8muCgQ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > My plan is for every query that could be optimized by adjusting=20 > parameters: I'll enable parameters that'll speed it up, run the query,=20 > then set the parameters back to their default values. Unless you intend to regularly test these, or have static data this may cause you more problems than it fixes. Any change in the data may make the plan you have forced a non-optimal one. A much better approach is to tweek the cost values that cause the planner to chose that particular plan. The random_page_cost will probably have the most effect on the plan chosen. #effective_cache_size =3D 1000 # typically 8KB each #random_page_cost =3D 4 # units are one sequential page fetch cost #cpu_tuple_cost =3D 0.01 # (same) #cpu_index_tuple_cost =3D 0.001 # (same) #cpu_operator_cost =3D 0.0025 # (same) --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-SgA/N4Hooa66+N8muCgQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+32xe6DETLow6vwwRAl+3AJ9Y4NhTUcOhEaE8tt2+O3xdoC6TRQCfY8A0 N1+D3Ykdbhx68ruwooNq7qs= =EqO3 -----END PGP SIGNATURE----- --=-SgA/N4Hooa66+N8muCgQ--