David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)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