Re: BIGINT datatype and Indexes Failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis Gasparin <denis(at)edinet(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: BIGINT datatype and Indexes Failure
Date: 2001-08-24 13:50:52
Message-ID: 3038.998661052@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Denis Gasparin <denis(at)edinet(dot)it> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2001-08-24 14:14:19 Re: problems transfering databases
Previous Message Miroslav Koncar 2001-08-24 13:45:36 Re: problems transfering databases