| От | Dmitry Tkach |
|---|---|
| Тема | Re: join and where clause equivalent ? |
| Дата | |
| Msg-id | 3EE5F1F5.7070607@openratings.com обсуждение исходный текст |
| Ответ на | join and where clause equivalent ? (Nabil Sayegh <postgresql@e-trolley.de>) |
| Ответы |
Re: join and where clause equivalent ?
|
| Список | pgsql-novice |
Nabil Sayegh wrote: >Hi all, > >is > >"SELECT * FROM a JOIN b USING (id_a)" > >fully equivalent to > >"SELECT * FROM a, b WHERE a.id_a=b.id_a" ? > >Which is faster ? > >TIA > > I think, the latter form gives the optimizer more freedom in choosing the query path. In terms of the results, the two are equivalent, as for which is faster depends on how much you trust the optimizer - if you know exactly why a should be the outer table in the join, then the first form is better, if you want to leave the decision to the optimizer, then the second from is for you.
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера