Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 27DEF474E53 for ; Wed, 18 Sep 2002 17:17:42 -0400 (EDT) Received: from metrony.com (webware.metrony.com [207.159.131.106]) by postgresql.org (Postfix) with ESMTP id 98DEB476850 for ; Wed, 18 Sep 2002 17:17:40 -0400 (EDT) Received: from aaronlaptop ([66.9.109.130]) by metrony.com (8.11.0/8.11.0) with SMTP id g8ILHfT76441 for ; Wed, 18 Sep 2002 21:17:41 GMT (envelope-from aaron@metrony.com) Message-ID: <007401c25f58$da559dc0$6220010a@metrony.com> From: "Aaron Held" To: "pgsql-sql" References: <5.1.1.6.2.20020918111926.00a82058@mail.nashlinux.com> Subject: Performance w/ multiple WHERE clauses Date: Wed, 18 Sep 2002 17:17:48 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/207 X-Sequence-Number: 9484 I am running into a serious performance issue with some basic queries. If I run something like select * from "Calls" WHERE ( ("CallType" = 'LONG DIST' )) The search takes about 15 seconds if I run select * from "Calls" WHERE ( ( "DateOfCall"='06/19/02') ) AND ( ( "CallType" = 'LONG DIST' )) [DateOfCall is a DateTime field] it takes 15 minutes! both columns are indexed individually and expalain reports and Index scan for both queries. Any pointers where to look next? Running pg 7.2 on RH Thanks, -Aaron Held