Skip site navigation (1) Skip section navigation (2)

RE: [HACKERS] OR clause status report

From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: (PostgreSQL-development) <hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] OR clause status report
Date: 1998-07-31 12:54:20
Message-ID: XFMail.980731085420.vev@michvhf.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 31-Jul-98 Bruce Momjian wrote:
> I have succeeded in making OR clauses use indexes.  I have not dealt
> with some of the more complex issues like x=3 or y=5 as Vadim
> mentioned,
> but at least it works.
> 
>       test=> select * from test where x=102532 or x=102533;
>            x
>       ------
>       102532
>       102533
>       (2 rows)
>       
>       test=> explain select * from test where x=102532 or x=102533;
>       NOTICE:  QUERY PLAN:
>       
>       Index Scan using i_test on test  (cost=4.10 size=1 width=4)

Now I've been wondering why my selects are so slow.  Is this telling me
that they're NOT using the index?  And if not, any ideas why?

The select returned 35 rows out of approx 170,000.

-----
campsites=> explain select * from locations where lower(city)='oxford';
NOTICE:  QUERY PLAN:

Seq Scan on locations  (cost=7263.30 size=84899 width=32)

EXPLAIN
campsites=> 
-----

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev(at)michvhf(dot)com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
   Online Searchable Campground Listings    http://www.camping-usa.com
       "There is no outfit less entitled to lecture me about bloat
               than the federal government"  -- Tony Snow
==========================================================================



In response to

Responses

pgsql-hackers by date

Next:From: Vadim MikheevDate: 1998-07-31 13:24:50
Subject: Re: [HACKERS] OR clause status report
Previous:From: Vadim MikheevDate: 1998-07-31 09:06:30
Subject: Re: AW: [HACKERS] OR clause status report

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group