X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F1747476369 for ; Mon, 5 May 2003 09:32:48 -0400 (EDT) Received: from nat.inquent.com (unknown [216.208.117.7]) by postgresql.org (Postfix) with ESMTP id 2F159474E42 for ; Mon, 5 May 2003 09:32:48 -0400 (EDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by nat.inquent.com (8.12.8p1/8.12.8) with ESMTP id h45DX5QU010855; Mon, 5 May 2003 09:33:05 -0400 (EDT) (envelope-from rbt@rbt.ca) Subject: Re: Indices are not used by the optimizer From: Rod Taylor To: Reiner Dassing Cc: pgsql-sql@postgresql.org In-Reply-To: <3EB6561B.6070709@wettzell.ifag.de> References: <3EB6561B.6070709@wettzell.ifag.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Jb3895mWG4PANf3E19dW" Organization: Message-Id: <1052141584.9846.24.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 05 May 2003 09:33:05 -0400 X-Spam-Status: No, hits=-37.8 required=5.0 tests=BAYES_10,IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/52 X-Sequence-Number: 13217 --=-Jb3895mWG4PANf3E19dW Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Are you really expecting 19 million rows to be returned -- are you really going to use them all? How about explain analyze output? Have you tried using a cursor to allow for parallel processing? (pull 1000 rows, do work, pull next 1000 rows, do work, etc.) > wetter=3D# explain select * from wetter where epoche > '2001-01-01'; > QUERY PLAN > ------------------------------------------------------------------------- > Seq Scan on wetter (cost=3D0.00..614795.55 rows=3D19054156 width=3D16) > Filter: (epoche > '2001-01-01 00:00:00+00'::timestamp with time zone) > (2 rows) --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-Jb3895mWG4PANf3E19dW Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+tmgQ6DETLow6vwwRAmv9AJ96xd3+IpxPan6Ks6+BQ+CYTCmQ8gCdHNWf WJ0X8iz7f5NzoHDGyD704ok= =46+3 -----END PGP SIGNATURE----- --=-Jb3895mWG4PANf3E19dW--