Use cases for lateral that do not involve a set returning function

Поиск
Список
Период
Сортировка
От AJ Welch
Тема Use cases for lateral that do not involve a set returning function
Дата
Msg-id CAO-RzR+yEFGdi8CLgqyrfm77c9D5Ttk2ErpKnBPqkWO9w8WGPA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Use cases for lateral that do not involve a set returning function  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
I was reading this post the other day:

http://blog.heapanalytics.com/postgresqls-powerful-new-join-type-lateral/

I suspected some of the claims in the post may not have been accurate. This one in particular:

"Without lateral joins, we would need to resort to PL/pgSQL to do this analysis. Or, if our data set were small, we could get away with complex, inefficient queries."

The sum(1) and order by time limit 1 approach seemed less than ideal to me and I thought this analysis could be done with normal left joins instead of lateral left joins. So I came up with a proof of concept:


Is my conclusion in the README correct? Does anything beyond select...from...where force a nested loop? In that case, is lateral really only useful with set returning functions as the docs suggest? Does anyone know of any use cases for lateral that do not involve a set returning function?

Thanks,
AJ

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: I did some testing of GIST/GIN vs BTree indexing…
Следующее
От: Sérgio Saquetim
Дата:
Сообщение: Strange behavior in generate_series(date, date, interval) with DST