Re: Which Join is better - Mailing list pgsql-performance

From Szymon Guz
Subject Re: Which Join is better
Date
Msg-id CAFjNrYu0W9K6ZBDEg5JDTbi4d_hsTTQx_tshvsiNc0SHzk9+hQ@mail.gmail.com
Whole thread Raw
In response to Which Join is better  (Adarsh Sharma <adarsh.sharma@orkash.com>)
List pgsql-performance


On 2 August 2011 08:42, Adarsh Sharma <adarsh.sharma@orkash.com> wrote:
Dear all,

Just want to know which join is better for querying data faster.

I have 2 tables A ( 70 GB ) & B ( 7 MB )

A has 10 columns & B has 3 columns.Indexes exist on both tables's ids.

select p.* from table A p, B q where p.id=q.id

or

select p.* from table B q , A p where q.id=p.id



Hi,
it really doesn't matter. PostgreSQL can reorder the joins as it likes.
And you can always check, but I think the plans will be the same.

regards
Szymon 

pgsql-performance by date:

Previous
From: Adarsh Sharma
Date:
Subject: Which Join is better
Next
From: Maria Arias de Reyna
Date:
Subject: Re: Which Join is better