Join efficiency

From: "Russ Brown" <postgres(at)dot4dot(dot)plus(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Join efficiency
Date: 2004-09-01 11:54:45
Message-ID: opsdncpjgfg2z5qo@relay.plus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

Recently a post on this list made me think a bit about the way in which I
write my queries.

I have always written queries with ordinary joins in this manner:

SELECT * FROM a, b WHERE a.x=b.x;

However I recently saw an laternative syntax:

SELECT * FROM a JOIN b ON a.x=b.x;

Is there any difference between these queries in terms of the speed of
planning or the quality of the plan untimately used? I'd imagine that the
second form provides more information that the planner may be able to use
to make a better plan (or make a good plan more easily), but I've never
had any problems with the first form.

It also seems to me that the second form is more self-documenting, which
is something I'm always in favour of.

I'd appreciate anyone's thought/insight.

Thanks.

--

Russell Brown

Responses

Browse pgsql-general by date

  From Date Subject
Next Message terry 2004-09-01 12:10:52 Re: Join efficiency
Previous Message Prabu Subroto 2004-09-01 11:52:51 insertiing an image file (blob) into postres...