X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C6D35D1B575 for ; Tue, 4 May 2004 04:16:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 19721-07 for ; Tue, 4 May 2004 04:16:03 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 259E0D1E6C5 for ; Tue, 4 May 2004 04:16:01 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i447G0Sx008210 for ; Tue, 4 May 2004 07:16:00 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i4474i0d083104 for pgsql-admin@postgresql.org; Tue, 4 May 2004 07:04:44 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.admin Subject: index not used for boolean Date: Tue, 04 May 2004 09:04:39 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 18 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@pyrenet.fr User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/27 X-Sequence-Number: 13343 Hi all, is it normal that in a select like: select * from foo where expired; the index on expired is not used? If I rewrite that query: select * from foo where expired = true; then the index is used! I'm using postrgres 7.4.2 Regards Gaetano Mendola