X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7D63D5E46E9 for ; Mon, 30 Aug 2004 15:17:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91528-02 for ; Mon, 30 Aug 2004 18:17:31 +0000 (GMT) Received: from emepe3.com (unknown [69.93.218.52]) by svr1.postgresql.org (Postfix) with ESMTP id CA48C5E46C2 for ; Mon, 30 Aug 2004 15:17:31 -0300 (ADT) Received: from [200.89.130.112] (helo=[192.168.0.101]) by emepe3.com with asmtp (Exim 3.35 #1 (Debian)) id 1C1qzI-0008A5-00 for ; Mon, 30 Aug 2004 13:34:41 -0500 Subject: Re: seqscan instead of index scan From: Martin Sarsale To: pgsql-performance@postgresql.org In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB3412A748D@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB3412A748D@Herge.rcsinc.local> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Bj0TcJgC3Mt/MwzQ9e8O" Organization: Emepe3.com Inc Message-Id: <1093889849.1680.83.camel@kadaif> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 30 Aug 2004 15:17:29 -0300 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/449 X-Sequence-Number: 8085 --=-Bj0TcJgC3Mt/MwzQ9e8O Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2004-08-30 at 15:06, Merlin Moncure wrote: > create function is_somethingable (ctype, dtype) returns boolean as Thanks, but I would prefer a simpler solution. I would like to know why this uses a seqscan instead of an index scan: create index t_idx on t((c+d)); select * from t where c+d > 0;=20 --=-Bj0TcJgC3Mt/MwzQ9e8O Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBM285hruVGj+ub3MRAvAUAKCX/jDG6Xtz/ZhiBIeiXIhSL9EqFQCgnyfH p2BvlqoMZjlDw8roQFe6Vyg= =LMhX -----END PGP SIGNATURE----- --=-Bj0TcJgC3Mt/MwzQ9e8O--