MySQL Forums
Forum List  »  Performance

Re: query with bad performance after migration to mysql 5.6
Posted by: walter verdelocco
Date: December 10, 2015 07:39AM

thanks !!!!
with workaroubd works fine ..

mysql> SELECT messaggio.id, messaggio.data, allegati.id FROM ( select m.id from messaggio m WHERE m.idarticolo='repnews_271330' AND m.idpadre=0 AND m.pubblica=1 ORDER BY m.data DESC LIMIT 50 ) as m_padre join messaggio on (m_padre.id=messaggio.idpadre) left join allegati on messaggio.id = allegati.idpost UNION ALL SELECT messaggio.id, messaggio.data, allegati.id FROM ( select m.id from messaggio m WHERE m.idarticolo='repnews_271330' AND m.idpadre=0 AND m.pubblica=1 ORDER BY m.data DESC LIMIT 50 ) as m_padre join messaggio on (m_padre.id=messaggio.id) left join allegati on messaggio.id = allegati.idpost order by 1 desc, 2 desc, 3 desc;
+-------+------------+------+
| id | data | id |
+-------+------------+------+
| 20352 | 1169210692 | NULL |

|
+-------+------------+------+
27 rows in set (0.00 sec)


walter

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: query with bad performance after migration to mysql 5.6
1055
December 10, 2015 07:39AM


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.