Re: sequential scan when using bigint value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: sequential scan when using bigint value
Date: 2004-03-19 15:17:02
Message-ID: 24268.1079709422@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-03-19 15:40:43 Re: Index selection (and partial index) for BYTEA field
Previous Message Carmen Gloria Sepulveda Dedes 2004-03-19 15:13:12 7.4.2 on Solaris 9 - Error