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
6319
June 01, 2009 03:07AM
3057
June 02, 2009 07:48PM
3141
June 03, 2009 12:58AM
Re: Get rid of Temporary/filesort, rather simple query
2725
June 03, 2009 10:52PM
2756
June 04, 2009 01:07AM
3203
June 04, 2009 09:03AM
2741
June 04, 2009 03:06PM
2747
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.