| От | Bruno Wolff III |
|---|---|
| Тема | Re: Avoiding sequential scans with OR join condition |
| Дата | |
| Msg-id | 20041018141939.GA21047@wolff.to обсуждение |
| Ответ на | Re: Avoiding sequential scans with OR join condition (Mike Mascari <mascarm@mascari.com>) |
| Список | pgsql-general |
On Sun, Oct 17, 2004 at 03:30:32 -0400, Mike Mascari <mascarm@mascari.com> wrote: > > I'm thinking that the WHERE clauses condition should read: > > WHERE l1.p_pkey is not null OR l2.p_key is not null; That seems to make more sense. I was puzzling about that condition myself. If both keys where not null, there wouldn't even be a need for "left" joins. Note that the output is different than you were originally getting as well, since previously rows looked like one big table row combined with one little table row. Now you are getting one big table row combined with two little table rows (one of which might be null). This is probably still faster, but you will need to change how you use the output.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера