sql query not using indexes

Поиск
Список
Период
Сортировка
От User Lenzi
Тема sql query not using indexes
Дата
Msg-id 39C8F3DB.78D055E7@k1.com.br
обсуждение исходный текст
Ответы Re: sql query not using indexes  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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???



В списке pgsql-sql по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: [Fwd: Re: no ORDER BY in subselects?]
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: [GENERAL] Foreign Keys Help Delete!