Bug #441: Index using INT8 data type is ignored

Started by PostgreSQL Bugs Listover 24 years ago3 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

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 make use 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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: Bug #441: Index using INT8 data type is ignored

Try coercing your constants to int8 explicitly:

... WHERE int8col = 42::int8;

See the archives for more info about this.

regards, tom lane

#3grant
grant@amadensor.com
In reply to: PostgreSQL Bugs List (#1)
Re: Bug #441: Index using INT8 data type is ignored

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);