On Mon, 3 Feb 2003, Mikael Carneholm wrote:
> When searching for a specific row on the primary key (type: bigint),
> the search took about 6,5 seconds. The column has a default btree
> index as created by the primary key constraint. However, when
> searching for the same row on one of it's columns (type: text) which
> has a functional index on lower(column name), the same row was
> retrieved in 19ms! That's ~335 times faster!
Did you remember to cast the constant into bigint? If not, it probably
ignored the bigint index and did a table scan.