Re: Join question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Friesen <mfriesen(at)pmcanada(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Join question
Date: 2001-01-07 01:27:30
Message-ID: 9061.978830850@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Mike Friesen <mfriesen(at)pmcanada(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ron Johnson 2001-01-07 01:56:31 Cross-database tables
Previous Message Mike Friesen 2001-01-06 22:54:40 Join question