The "fast" server makes a much more accurate estimation of the number of rows to expect (4 rows are returning, 1 was estimated). The "slow" server estimates 1151 rows. Try running ANALYZE on the slow one
-- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance