sql query not using indexes

From: User Lenzi <lenzi(at)k1(dot)com(dot)br>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: sql query not using indexes
Date: 2000-09-20 17:28:59
Message-ID: 39C8F3DB.78D055E7@k1.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I am using last version of postgresql, 7.0.2 on a FreeBSD or Linux box

I create a table:
create table teste (
login text,
datein datetime);

create index teste1 on teste (login);

if I start a query:

explain select * from teste where login = 'xxx'
results:
Index Scan using teste1 on teste (cost=0.00..97.88 rows=25 )

however a query:
explain select * from teste where login > 'AAA'
results:
Seq Scan on teste ....

On a machine running version 6.5 both queries results index scan.

this results that the version 6.5 is faster than version 7.0.2 on this
kind of
query.

Any explanation???

Please???

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2000-09-20 18:21:24 Re: [GENERAL] Foreign Keys Help Delete!
Previous Message Josh Berkus 2000-09-20 16:20:25 [Fwd: Re: no ORDER BY in subselects?]