Index not used with user

Поиск
Список
Период
Сортировка
От gelinas@tech-m4.com
Тема Index not used with user
Дата
Msg-id 3C8541DA.88A018CC@tech-m4.com
обсуждение исходный текст
Список pgsql-general
Hi,
i don't understand why my index is not used when i place a constant in
my query.

explain select * from employes2 where usager='postgres';
NOTICE:  QUERY PLAN:

Index Scan using employes2_usager on employes2  (cost=0.00..2.01 rows=1
width=222)

EXPLAIN
explain select * from employes2 where usager=user;
NOTICE:  QUERY PLAN:

Seq Scan on employes2  (cost=0.00..2.81 rows=1 width=222)

EXPLAIN

Can you help me?

--
Steve Gelinas
System administrator



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

Предыдущее
От: "W. McCloud"
Дата:
Сообщение: Re: Which administration software to use
Следующее
От: hubert.palme@web.de (Hubert Palme)
Дата:
Сообщение: Re: PL/pgSQL Syntax Problem