Received: from cooncatgamma.aretoo.com (unknown [63.94.251.10]) by postgresql.org (Postfix) with ESMTP id 01A4C47638E for ; Tue, 19 Mar 2002 13:40:52 -0500 (EST) Received: from david ([192.168.100.198]) by cooncatgamma.aretoo.com (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with SMTP id g2JIepZ17698 for ; Tue, 19 Mar 2002 13:40:51 -0500 From: "David Siebert" To: Subject: Yet another indexing issue. Date: Tue, 19 Mar 2002 13:40:51 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <20020315101751.N51975-100000@megazone23.bigpanda.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Archive-Number: 200203/953 X-Sequence-Number: 22322 I am having issues with an Index. Here is the query SELECT * FROM phonecalls WHERE istatus = 0 AND (sfor = 'pat' OR sfor='TECHIES') ORDER BY ipri DESC, dplaceddate; I have tried '0' and jut plain 0 as well as type casting it with ::int4 . Here is the index I think it should use. CREATE INDEX phonecallspoll ON phonecalls USING btree (sfor varchar_ops, istatus int4_ops); But it is still doing a scan? Any suggestions? yes I have used Vacumme with the anylise option. Thanks for any info.