Re: Optimize query for listing un-read messages

Поиск
Список
Период
Сортировка
От Andreas Joseph Krogh
Тема Re: Optimize query for listing un-read messages
Дата
Msg-id OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2
обсуждение исходный текст
Ответ на Re: Optimize query for listing un-read messages  (Brice André <brice@famille-andre.be>)
Ответы Re: Optimize query for listing un-read messages  (Brice André <brice@famille-andre.be>)
Список pgsql-sql
På søndag 04. mai 2014 kl. 18:49:43, skrev Brice André <brice@famille-andre.be>:
Yes, I was a bit too fast. but replace it with
 
WHERE NOT prop.is_read = TRUE
 
and it should be OK.
 
No, that also will be treated as an INNER JOIN, because it kills tuples where prop is null. I need entries where prop IS NULL (hence the LEFT OUTER JOIN) because messages without an entry in message_property must be treated as unread, the same as messages with an entry in message_property where is_read=FALSE.
 
--
Andreas Jospeh Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Вложения

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

Предыдущее
От: Brice André
Дата:
Сообщение: Re: Optimize query for listing un-read messages
Следующее
От: Brice André
Дата:
Сообщение: Re: Optimize query for listing un-read messages