agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: Brice André <brice@famille-andre.be>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Optimize query for listing un-read messages
Date: Sun, 4 May 2014 18:53:57 +0200 (CEST)
Message-ID: <OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2> (raw)
In-Reply-To: <CAOBG12m_KDpJRkgfRSUis_9F082+Zk4vjeXnoRg=w5QGY5Dx9g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

På søndag 04. mai 2014 kl. 18:49:43, skrev Brice André <brice@famille-andre.be 
<mailto: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 andreas@visena.com 
<mailto:andreas@visena.com> www.visena.com <https://www.visena.com;  
<https://www.visena.com;  

view thread (7+ messages)  latest in thread

Message-ID: <OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2>
Permalink:  ../OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2/
Also on:    postgresql.org/message-id/OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: andreas@visena.com, brice@famille-andre.be
  Subject: Re: Optimize query for listing un-read messages
  In-Reply-To: <OfficeNetEmail.b7.623504e52e18e017.145c825f77a@prod2>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox