Search Postgresql Archives

cast affects use of indexes ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux