Denis Gasparin <[EMAIL PROTECTED]> writes:
> On table a (INTEGER datatype) the search is done using the index.
> Instead on table b (BIGINT datatype) the search is always done using the 
> seq scan.

Try
        select * from b where col1 = 123::int8;

The query planner is not presently very smart about cross-datatype
comparisons (int8 vs int4).  We have a TODO item to fix this...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to