<chuckle> You're right - for some reason I was looking at the (18 rows) at the bottom. Pilot error indeed - I'll
haveto figure out what's going on with my data.<br /><br /> Thanks!<br /><br /> Tom Lane wrote: <blockquote
cite="mid:28999.1214839555@sss.pgh.pa.us"type="cite"><pre wrap="">John Beaver <a class="moz-txt-link-rfc2396E"
href="mailto:john.e.beaver@gmail.com"><john.e.beaver@gmail.com></a>writes: </pre><blockquote type="cite"><pre
wrap="">Ok,here's the explain analyze result. Again, this is Postgres 8.3.3 and
I vacuumed-analyzed both tables directly after they were created. </pre></blockquote><pre wrap=""> </pre><blockquote
type="cite"><prewrap=""> Merge Join (cost=1399203593.41..6702491234.74 rows=352770803726
width=22) (actual time=6370194.467..22991303.434 rows=15610535128 loops=1) </pre></blockquote><pre wrap="">
^^^^^^^^^^^
Weren't you saying that only 50 rows should be returned? I'm thinking
the real problem here is pilot error: you missed out a needed join
condition or something. SQL will happily execute underconstrained
queries ...
regards, tom lane
</pre></blockquote>