X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 04450D1B19F for ; Fri, 21 May 2004 03:53:57 -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 12867-02 for ; Fri, 21 May 2004 03:53:38 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6D772D1B1B6 for ; Fri, 21 May 2004 03:53:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i4L6rbeE024813; Fri, 21 May 2004 02:53:37 -0400 (EDT) To: Doug Y Cc: pgsql-sql@postgresql.org Subject: Re: OR clause causing strange index performance In-reply-to: <6.0.1.1.2.20040520123807.01f2dec0@mail.traderonline.com> References: <6.0.1.1.2.20040520123807.01f2dec0@mail.traderonline.com> Comments: In-reply-to Doug Y message dated "Thu, 20 May 2004 13:32:21 -0400" Date: Fri, 21 May 2004 02:53:37 -0400 Message-ID: <24812.1085122417@sss.pgh.pa.us> From: Tom Lane 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/185 X-Sequence-Number: 17899 Doug Y writes: > Is there any way to get this query to use the correct index condition so > that it runs in a reasonable amount of time? I think CVS tip (7.5-to-be) would handle this better, but it's hard to be sure since you didn't provide a self-contained test case. regards, tom lane