On 15 Sep 2002, Glen Eustace wrote:
> I know this is an FAQ, but each case seems to be different. I can not
> understand why the primary index on this table is not used. It was
> specifically created to make this query run quickly.
The one in this case is probably the smallint/bigint problem with
constants being converted to int4 when unquoted.
Try client='10143' or client=CAST(10143 as smallint) in the where
clauses instead of client=10143 and see if that gives you usage of the
index.