Hi there,
> > I have a severe problem with PostgreSQL 7.2.1.
> > I have a table containing 500mio records (for testing purposes).
> > Indexes: idx_one_xmod
> > Unique keys: idx_one_id
> >
> > cluster=# SET enable_seqscan TO off;
> > SET VARIABLE
> > cluster=# SELECT * FROM one WHERE id=300000;
> You'll need to quote or explicitly cast the
> constant to bigint for the indexes to get used.
> It's a problem with the way numeric constants are
> handled. They'll get prematurely forced to int4
> if they fit, and won't promote for index use.
Perhaps this should be added to the Documentation in the indexes
part. I had the same problem last week and I guess it's a very common and
frequent question.
[]'s
Ricardo.