Re: Get rid of Temporary/filesort, rather simple query
I'm still struggling with your [mis]use of GROUP BY. There are multiple rows in each table for a given conversation_uuid, right? This will pick ONE of them to evaluate:
IF(p2u.last_viewed<pm.datetime,true,false) AS unread
It will not check all the last_viewed's.
maybe MIN(last_viewed) < MAX(datetime)? Or some other _aggregrate_ that will rummage through all the dates for the whole conversation?
What is a PM?
Sounds to me like a "conversation" is a "thread".
Can you say in words what the SELECT is supposed to do? I am having too much trouble with the GROUP BY to understand it from the SQL.
Subject
Views
Written By
Posted
6266
June 01, 2009 03:07AM
3032
June 02, 2009 07:48PM
3112
June 03, 2009 12:58AM
Re: Get rid of Temporary/filesort, rather simple query
2706
June 03, 2009 10:52PM
2737
June 04, 2009 01:07AM
3183
June 04, 2009 09:03AM
2722
June 04, 2009 03:06PM
2725
June 04, 2009 07:39PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.