Tom Lane wrote:
> The only way it's wrong is if the particular value being searched for is
> much less than 1/14th of the table. IIRC Postgres 7.1 does not have
> statistics about anything beyond the most common value of the column,
> and so it's easily misled by nonuniform data distributions. If that's
> your situation then an update to 7.2.* or 7.3.* seems called for.
And this is exactly the case... This is the data distribution for the
column with the 14 distinct values:
code | record_count
----------+--------------
| 186802
aa | 432
bb | 31557
cc | 5599
dd | 15511
ee | 8364
ff | 769796
gg | 328
hh | 4911
ii | 1904
jj | 9145
kk | 576944
ll | 2296
OK. I will upgrade my installation and see what happens.
Thanks very much for the advice.
Best regards...
kp