Joins and their efficiencies - Mailing list pgsql-general

From Hadley Willan
Subject Joins and their efficiencies
Date
Msg-id 1049315977.1677.80.camel@atlas.sol.deeper.co.nz
Whole thread Raw
Responses Re: Joins and their efficiencies
List pgsql-general
Hi All,
    I was doing a query yesterday, and implemented it two ways to see if
there was a difference. The first was the more standard way of doing the
query, by specifying the tables, and then linking them with AND x.id =
y.object etc..... I ran this and there seemed to be a momentary pause of
around one to one-half seconds before the result set returned. I decided
to try the same query again, but this time using, LEFT JOIN to bring in
the extra tables I wanted, it still had a few ANDs in there but only
about half as much. I ran the query and the ResultSet returned
instantly!

Is it correct then to assume that a LEFT JOIN is more efficient than a
straight join?

Thanks.
--
Hadley Willan > Systems Development > Deeper Design Limited. +64(7)377-3328
hadley.willan@deeperdesign.co.nz > www.deeperdesign.com > +64(21)-28-41-463
Level 1, 4 Tamamutu St, PO Box 90, TAUPO 2730, New Zealand.


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: this date format thing.
Next
From: Dennis Gearon
Date:
Subject: Re: this date format thing.