Re: tuning SQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Zhang, Anna" <azhang(at)verisign(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: tuning SQL
Date: 2002-01-29 16:57:54
Message-ID: 14789.1012323474@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"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

In response to

  • tuning SQL at 2002-01-29 15:57:01 from Zhang, Anna

Browse pgsql-admin by date

  From Date Subject
Next Message Zhang, Anna 2002-01-29 17:23:17 Re: tuning SQL
Previous Message Ross J. Reedstrom 2002-01-29 16:39:27 Re: tuning SQL