Re: [SQL] Difference between these two queries ?

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: [SQL] Difference between these two queries ?
Дата
Msg-id AANLkTikoKnZQ9pcBAw7WutWjTWmNt2AsftpojbNEjrgR@mail.gmail.com
обсуждение исходный текст
Ответ на Difference between these two queries ?  (Nilesh Govindarajan <lists@itech7.com>)
Список pgsql-general
On 6 June 2010 06:30, Nilesh Govindarajan <lists@itech7.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.ru@gmail.com / Skype: gray-hemp / ICQ: 29353802

В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Dell Poweredge server and Postgres
Следующее
От: u235sentinel
Дата:
Сообщение: Re: Dell Poweredge server and Postgres