Christo Du Preez <christo@mecola.com> writes:
> Yes, I have just about tried every combination of vacuum on the
> database. Just to make 100% sure.
Well, there's something mighty wacko about that rowcount estimate;
even if you didn't have stats, the estimate for a simple equality
constraint oughtn't be 100% match.
What do you get from SELECT * FROM pg_stats WHERE tablename = 'layertype'
on both systems?
regards, tom lane