From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Nilesh Govindarajan <lists(at)itech7(dot)com> |
Cc: | PostgreSQL SQL <pgsql-sql(at)postgresql(dot)org>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [SQL] Difference between these two queries ? |
Date: | 2010-06-06 09:04:33 |
Message-ID: | AANLkTikoKnZQ9pcBAw7WutWjTWmNt2AsftpojbNEjrgR@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On 6 June 2010 06:30, Nilesh Govindarajan <lists(at)itech7(dot)com> wrote:
> 1. SELECT b.* from banners b, banners_users bu where b.id = bu.bid and
> bu.uid = 5;
>
> 2. SELECT b.* from banners b INNER JOIN banners_users bu ON b.id =
> bu.bid AND bu.uid = 5;
Here is an explanation:
http://www.postgresql.org/docs/8.4/interactive/queries-table-expressions.html#QUERIES-FROM
>
> What is the first type of join called ?
CROSS JOIN
>
> and is it possible that they have different execution times ?
AFAIK planner would choose the same execution plan in your situation
so it is not.
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp / ICQ: 29353802
From | Date | Subject | |
---|---|---|---|
Next Message | u235sentinel | 2010-06-06 14:50:22 | Re: Dell Poweredge server and Postgres |
Previous Message | Greg Smith | 2010-06-06 08:04:13 | Re: Dell Poweredge server and Postgres |
From | Date | Subject | |
---|---|---|---|
Next Message | msi77 | 2010-06-06 14:58:35 | Re: inner join and limit |
Previous Message | Nilesh Govindarajan | 2010-06-06 02:30:46 | Difference between these two queries ? |