Re: How to find entries missing in 2nd table?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Aaron Bono <postgresql(at)aranya(dot)com>, "Exner, Peter" <Exner(at)his(dot)de>
Cc: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, SQL Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to find entries missing in 2nd table?
Date: 2006-07-13 16:16:51
Message-ID: 20060713161651.39567.qmail@web31809.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > SELECT controller_id FROM control
> > WHERE controller_id NOT IN
> > (SELECT DISTINCT controller_id FROM datapack);
> The DISTINCT is not necessary. I have heard with Oracle that DISTINCT is a
> huge performance problem. Is that true on PostgreSQL also?

From my experience, it does not preform as well as the standard group by clause. I noticed a ~20%
increase in query run times.

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Aaron Bono 2006-07-13 16:25:03 Re: How to find entries missing in 2nd table?
Previous Message Aaron Bono 2006-07-13 15:46:11 Re: How to find entries missing in 2nd table?