cast affects use of indexes ?

Поиск
Список
Период
Сортировка
От Alex Vinogradovs
Тема cast affects use of indexes ?
Дата
Msg-id 1216852649.4848.139.camel@localhost
обсуждение исходный текст
Ответы Re: cast affects use of indexes ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Guys,

I've got a table with an indexed column of a numeric user
type (implemented in C). When I run a select on that table
in a form of :

select * from sometable where column = 89464;

sequential scan is used...

When I rewrite the query to use cast like this :

select * from sometable where column = 89464::mytype;

bitmap index scan and bitmap heap scan are used.

Is it possible to make it work properly without
use of explicit casts ? Thanks!


Best regards,
Alex Vinogradovs





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

Предыдущее
От: Kevin Neufeld
Дата:
Сообщение: contrib catalogs
Следующее
От: "Garber, Mikhail"
Дата:
Сообщение: problem installing RPMs on RHEL5