Search Postgresql Archives

Re: [SQL] Difference between these two queries ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6 June 2010 06:30, Nilesh Govindarajan <lists@xxxxxxxxxx> 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.ru@xxxxxxxxx / Skype: gray-hemp / ICQ: 29353802

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux