Re: Performance of outer joins?
От
Tom Lane
Тема
Re: Performance of outer joins?
Дата
Msg-id
8617.1166309490@sss.pgh.pa.us
Ответ на
Performance of outer joins? (Benjamin Smith)
Список
Дерево обсуждения
Performance of outer joins? Benjamin Smith <ben@schoolpathways.com>
Re: Performance of outer joins? "macgillivary" <macgillivary@gmail.com>
Re: Performance of outer joins? Tom Lane <tgl@sss.pgh.pa.us>
Benjamin Smith writes: > FROM customers > JOIN calendars ON > ( > -- GIVE A CALENDAR OF POSSIBLE DAYS FOR DELIVERIES > calendar.day < 20061201 > AND calendar.day >= 20060101 > ) Haven't you written a cross-product join here? Seems like a bad idea if you'd like it to be fast. Especially since you then left-joined it to something else, meaning that every row in the cross product must in fact generate output. Do you really want to be deluged with a table showing all the customers you DIDN'T deliver to on each day, for every day in the year? regards, tom lane
В списке pgsql-general по дате отправления
От: Magnus Hagander
Дата: