Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id SAA10041 for postgres-dist; Fri, 25 Mar 1994 18:53:55 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199403260253.SAA10041@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id SAA10032 for <postgres@postgres.Berkeley.EDU>; Fri, 25 Mar 1994 18:53:53 -0800
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id SAA02832; Fri, 25 Mar 1994 18:53:50 -0800
Message-Id: <199403260253.SAA02832@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: suresh@nlm.nih.gov (Suresh Srinivasan)
Cc: postgres@postgres.Berkeley.EDU, rodgers@hume.nlm.nih.gov
Subject: Re: Retrieve question 
Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
Date: Fri, 25 Mar 94 18:53:50 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Fri, 25 Mar 94 18:53:55 -0800
Resent-XMts: smtp

aoki@postgres.Berkeley.EDU (Paul M. Aoki) writes:
> suresh@nlm.nih.gov (Suresh Srinivasan) writes:
> > It seems that if the query is qualified by
> > even a simple Boolean expression, the search
> > defaults to a sequential scan rather than
> > use the index.
> you can have fairly complex AND/NOT expressions and use indices.
> the key in your query is the OR.
[blah blah blah, blah, blah blah blah blah...]

to put it more consisely, you're absolutely right for OR clauses.
the optimizer won't use an index with OR -- we don't keep the 
statistics it needs to make intelligent use of them so the 
corresponding code has just never been written.  nor will it be,
at this point.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
