From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Ott? Havasv?lgyi <havasvolgyi(dot)otto(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Throwing unnecessary joins away |
Date: | 2006-01-14 00:22:05 |
Message-ID: | 20060114002205.GP9017@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Thu, Jan 12, 2006 at 07:51:22PM +0100, Ott? Havasv?lgyi wrote:
> Hi,
>
> If the join is to a primary key or notnull unique column(s), then
> inner join is also ok. But of course left join is the simpler case.
> An example:
Actually, you need both the unique/pk constraint, and RI (a fact I
missed in the email I just sent). Nullability is another consideration
as well. But there certainly are some pretty common cases that can be
optimized for.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-14 00:27:28 | Re: Stable function being evaluated more than once in a single query |
Previous Message | Jim C. Nasby | 2006-01-14 00:17:58 | Re: Throwing unnecessary joins away |