Re: sequential scan when using bigint value - Mailing list pgsql-general

From Tom Lane
Subject Re: sequential scan when using bigint value
Date
Msg-id 24268.1079709422@sss.pgh.pa.us
Whole thread Raw
In response to sequential scan when using bigint value  (David Garamond <lists@zara.6.isreserved.com>)
List pgsql-general
David Garamond <lists@zara.6.isreserved.com> writes:
> I have a table of 2mil records. The table consists of two columns, id
> (BYTEA/GUID, PK) and i (INT, UNIQUE INDEX). Could someone explain why,
> when using a bigint value like this:
> Postgres immediately switches from index scan to seq scan?

Cross-data-type comparisons aren't indexable.  (At least not in current
releases.  Your examples do work in CVS tip.)

            regards, tom lane

pgsql-general by date:

Previous
From: Carmen Gloria Sepulveda Dedes
Date:
Subject: 7.4.2 on Solaris 9 - Error
Next
From: Tom Lane
Date:
Subject: Re: "People near me" query