Re: Join question - Mailing list pgsql-novice

From Tom Lane
Subject Re: Join question
Date
Msg-id 9061.978830850@sss.pgh.pa.us
Whole thread Raw
In response to Join question  (Mike Friesen <mfriesen@pmcanada.com>)
List pgsql-novice
Mike Friesen <mfriesen@pmcanada.com> writes:
> select * from icpr,iprc where icpr.prod_no='23' AND
> icpr.prod_no=iprc.prod_no;

> Can anyone tell me what I'm doing wrong?

Probably you're getting a poor plan for the query (likely, it's
using a nested loop).  Have you done VACUUM ANALYZE lately for
these tables?  If so, what does EXPLAIN show for the query?

            regards, tom lane

pgsql-novice by date:

Previous
From: Mike Friesen
Date:
Subject: Join question
Next
From: Ron Johnson
Date:
Subject: Cross-database tables