Re: Optimize query for listing un-read messages - Mailing list pgsql-sql

From Andreas Joseph Krogh
Subject Re: Optimize query for listing un-read messages
Date
Msg-id OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2
Whole thread Raw
In response to Re: Optimize query for listing un-read messages  (Brice André <brice@famille-andre.be>)
Responses Re: Optimize query for listing un-read messages
List 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
 
Attachment

pgsql-sql by date:

Previous
From: Brice André
Date:
Subject: Re: Optimize query for listing un-read messages
Next
From: Brice André
Date:
Subject: Re: Optimize query for listing un-read messages