X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4AB12D1C938 for ; Fri, 15 Aug 2003 15:24:30 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 78647-01 for ; Fri, 15 Aug 2003 12:24:19 -0300 (ADT) Received: from lucifer.akyasociados.com.ar (unknown [200.69.203.237]) by svr1.postgresql.org (Postfix) with ESMTP id 81A52D1C936 for ; Fri, 15 Aug 2003 12:24:13 -0300 (ADT) Received: from taz.oficina (taz.oficina [192.168.1.174]) (authenticated bits=0) by lucifer.akyasociados.com.ar (8.12.9/8.12.9) with ESMTP id h7FFQ44d093541; Fri, 15 Aug 2003 12:26:05 -0300 (ART) (envelope-from franco@akyasociados.com.ar) Subject: Re: query tuning From: Franco Bruno Borghesi To: dave@fastcrypt.com Cc: "pgsql-general@postgresql.org" In-Reply-To: <1060862412.1721.99.camel@localhost.localdomain> References: <71E37EF6B7DCC1499CEA0316A2568328DC9819@loki.globexplorer.com> <20030813211417.46be5abe.expect@ihubbell.com> <1060862412.1721.99.camel@localhost.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-BDAL1q+gicnWls68YtOC" Organization: AK y Asociados S.R.L. Message-Id: <1060961172.975.8.camel@taz.oficina> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 15 Aug 2003 12:26:12 -0300 X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/746 X-Sequence-Number: 47163 --=-BDAL1q+gicnWls68YtOC Content-Type: multipart/alternative; boundary="=-Hprw60HWQBVS9gVhVY1E" --=-Hprw60HWQBVS9gVhVY1E Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I usually reduce cpu_index_tuple_cost in postgresql.conf, from 0.001 to 0.000001, this way the optimizer is "more willing" to use indexes. Of course you should try different values until you find the ones that adjust to your system configuration. On Thu, 2003-08-14 at 09:00, Dave Cramer wrote: > I have a query which definitely runs faster when sequential scans are > turned off. Which parameters do I tune? and which way? >=20 > After quickly perusing the docs, and google, I think it is the > random_page_cost? >=20 > Any help would be appreciated. >=20 > Dave --=-Hprw60HWQBVS9gVhVY1E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable I usually reduce cpu_index_tuple_cost in postgresql.conf, from 0.001 to 0.0= 00001, this way the optimizer is "more willing" to use indexes.
Of course you should try different values until you find the ones that adju= st to your system configuration.

On Thu, 2003-08-14 at 09:00, Dave Cramer wrote:
I have a query which definitely runs faster=
 when sequential scans are
turned off. Which parameters do I tune? and which way?

After quickly perusing the docs, and google, I think it is the
random_page_cost?

Any help would be appreciated.

Dave
--=-Hprw60HWQBVS9gVhVY1E-- --=-BDAL1q+gicnWls68YtOC 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/PPuU21dVnhLsBV0RAjrmAJ9/yzoeNjNWOS4ap1qmq4Knv6LgJACeMXQ1 gVDrDLsWAEg8Dq4ZReaqNwA= =di61 -----END PGP SIGNATURE----- --=-BDAL1q+gicnWls68YtOC--