Re: How to find entries missing in 2nd table? - Mailing list pgsql-sql

From Nate Teller
Subject Re: How to find entries missing in 2nd table?
Date
Msg-id JOEPKPKCCCBGEIEIKIIPCEHCDAAA.nate.teller@mindspring.com
Whole thread Raw
In response to Re: How to find entries missing in 2nd table?  ("Aaron Bono" <postgresql@aranya.com>)
List pgsql-sql
<div class="Section1"><p class="MsoNormal"><span class="EmailStyle18"><font color="navy" face="Arial" size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial">Ihave received good performance with the
following:</span></font></span><pclass="MsoNormal"><span class="EmailStyle18"><font color="navy" face="Arial"
size="2"><spanstyle="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial"> </span></font></span><p
class="MsoNormal"><spanclass="EmailStyle18"><font color="navy" face="Arial" size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial">selectc.controller</span></font></span><p
class="MsoNormal"><spanclass="EmailStyle18"><font color="navy" face="Arial" size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial"><spanstyle="mso-spacerun: yes">   </span>from
controlc</span></font></span><p class="MsoNormal"><span class="EmailStyle18"><font color="navy" face="Arial"
size="2"><spanstyle="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial"><span style="mso-spacerun: 
yes">           </span>left outer join datapack d on d.controller_id = c.controller_id</span></font></span><p
class="MsoNormal"><spanclass="EmailStyle18"><font color="navy" face="Arial" size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial"><spanstyle="mso-spacerun: yes"> </span>where
d.controller_idis null</span></font></span><p class="MsoNormal"><span class="EmailStyle18"><font color="navy"
face="Arial"size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial"> </span></font></span><pclass="MsoNormal"><span
class="EmailStyle18"><fontcolor="navy" face="Arial" size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial">NateTeller</span></font></span><p
class="MsoNormal"><spanclass="EmailStyle18"><font color="navy" face="Arial" size="2"><span
style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial"> </span></font></span><pclass="MsoNormal"
style="margin-left:.5in"><fontcolor="black" face="Tahoma" size="2"><span
style="font-size:10.0pt;font-family:Tahoma;color:black">-----OriginalMessage-----<br /><b><span
style="font-weight:bold">From:</span></b>pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]<b><span
style="font-weight:bold">OnBehalf Of </span></b>Aaron Bono<br /><b><span style="font-weight:bold">Sent:</span></b>
Thursday,July 13, 2006 11:46 AM<br /><b><span style="font-weight:bold">To:</span></b> Exner, Peter<br /><b><span
style="font-weight:bold">Cc:</span></b>Richard Broersma Jr; SQL Postgresql List<br /><b><span
style="font-weight:bold">Subject:</span></b>Re: [SQL] How to find entries missing in 2nd table?</span></font><p
class="MsoNormal"style="margin-left:.5in"><font face="Times New Roman" size="3"><span
style="font-size:12.0pt"> </span></font><pclass="MsoNormal" style="margin-left:.5in"><font color="black" face="Times
NewRoman" size="3"><span style="font-size:12.0pt;color:black">On 7/12/06, <b><span style="font-weight:bold">Exner,
Peter</span></b><<a href="mailto:Exner@his.de">Exner@his.de</a>> wrote:</span></font><font color="black"><span
style="color:black;mso-color-alt:windowtext"></span></font><divstyle="border:none;border-left:solid #CCCCCC
.75pt;padding:0in0in 0in 6.0pt"><p class="MsoNormal" style="margin-left:40.8pt;border:none;mso-border-left-alt: 
solid #CCCCCC .75pt;padding:0in;mso-padding-alt:0in 0in 0in 6.0pt"><font color="black" face="Times New Roman"
size="3"><spanstyle="font-size:12.0pt; 
color:black">Hi,<br /><br /> what about<br /><br /> SELECT controller_id FROM control<br /> WHERE controller_id NOT
IN<br/> (SELECT DISTINCT controller_id FROM datapack);</span></font><font color="black"><span
style="color:black;mso-color-alt:windowtext"></span></font></div><pclass="MsoNormal" style="margin-left:.5in"><font
color="black"face="Times New Roman" size="3"><span style="font-size:12.0pt;color:black"><br /> The DISTINCT is not
necessary. I have heard with Oracle that DISTINCT is a huge performance problem.  Is that true on PostgreSQL also? <br
/><br/> ==================================================================<br />    Aaron Bono<br />    Aranya Software
Technologies,Inc.<br />    <a href="http://www.aranya.com">http://www.aranya.com</a><br />
==================================================================</span></font><font color="black"><span
style="color:black;mso-color-alt:windowtext"></span></font></div>

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Regular Expression in SQL
Next
From: John Tregea
Date:
Subject: Storing encrypted data?