Robert Haas <robertmhaas@xxxxxxxxx> writes: > A more interesting question is why you're not getting a plan like this: > Nested Loop > -> Seq Scan on objects > -> Append > -> Index Scan using xxx_pkey on itemXX > -> Index Scan using yyy_pkey on itemYY > -> Index Scan using zzz_pkey on itemZZ Probably because there are 4 million rows in the objects table. Or maybe it's a pre-8.2 database and can't even generate such a plan. But if it did generate it, it would almost certainly have decided that this was more expensive than a hash or merge join. People have this weird idea that the existence of an index ought to make enormous joins free ... regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance