Re: Postgres performs a Seq Scan instead of an Index Scan!

Поиск
Список
Период
Сортировка
От James Robinson
Тема Re: Postgres performs a Seq Scan instead of an Index Scan!
Дата
Msg-id 534A925F-276B-11D9-BFDF-000A9566A412@socialserve.com
обсуждение исходный текст
Ответ на Postgres performs a Seq Scan instead of an Index Scan!  (Jos van Roosmalen <josr@josr.org>)
Список pgsql-hackers
On Oct 26, 2004, at 12:12 PM, Jos van Roosmalen wrote:

> ATTR1 INT8

Looks like your column is int8, yet your query is sending in an int4. 
Therefore the index is not used. This is fixed in PG 8.0. In the mean 
time, you can:
SELECT * FROM TESTTABLE WHERE ATTR1=1::INT8 ...

which explicitly casts the literal int4 to an int8, making the int8 
column index useable.

----
James Robinson
Socialserve.com



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

Предыдущее
От: Jos van Roosmalen
Дата:
Сообщение: Postgres performs a Seq Scan instead of an Index Scan!
Следующее
От: Jochem van Dieten
Дата:
Сообщение: Re: Postgres performs a Seq Scan instead of an Index Scan!