Thread: Bug #441: Index using INT8 data type is ignored

Bug #441: Index using INT8 data type is ignored

From
pgsql-bugs@postgresql.org
Date:
Mauro Flores (mauro-flores@procergs.rs.gov.br) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Index using INT8 data type is ignored

Long Description
I have some tables on my data base with index and primary keys over int8(bigint) data type columns. Postgress doesn't
makeuse of those index. It allows to create but ignore them. I have no problem with index over others data types.  

Does anybody know why is it happening?

Thanks.

Sample Code


No file was uploaded with this report

Re: Bug #441: Index using INT8 data type is ignored

From
Tom Lane
Date:
Try coercing your constants to int8 explicitly:

    ... WHERE int8col = 42::int8;

See the archives for more info about this.

            regards, tom lane

Re: Bug #441: Index using INT8 data type is ignored

From
grant
Date:
2 questions:
1) Have you recently run an analyze?
2) Are you sure that an index scan would be more efficient than a seq
scan?  (are less than 25% of the records selected)  I don't know the
break-off boint in the query optimizer, but it may be more efficient on
that table to read the whole thing.

______________________________________________________________________________

                          Your mouse has moved.
       You must restart Windows for your changes to take effect.

#!/usr/bin/perl
print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);