"Zhang, Anna" <azhang(at)verisign(dot)com> writes:
> select count(*) from contact a, contact_discard b where a.contacthandle <>
> b.contacthandle;
Did you really mean "<>" here? If so, the plan you showed us is not for
this query. The above query is going to take approximately forever to
execute :-(
If you meant "=", then the hash join that the system is using seems like
a perfectly fine plan to me.
regards, tom lane