MySQL Forums
Forum List  »  Performance

Re: query with bad performance after migration to mysql 5.6
Posted by: Øystein Grøvlen
Date: December 09, 2015 09:30AM


Thanks for the trace.

One thing that has changed from 5.5 to 5.6 is that it is possible to use join buffering with outer join. I suspect that the optimizer will prefer join buffering over "Range checked for each record" that is used in 5.5. Hence, I suggest you try to turn off join buffering before running the query by setting

set optimizer_switch = 'block_nested_loop=off'

I would be interested in seeing the trace with this setting to.

Regardless, I hope you will file a bug report for this issue, and, if possible, provide data so that we can reproduce it. Based on the trace I see that the optimizer gets a much lower cost for the join order
messagio -> allegati -> m_padre
than for
messagio -> m_padre -> allegati

I would think that those join orders should be pretty equivalent so there is something strange going on.


Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote

Written By
Re: query with bad performance after migration to mysql 5.6
December 09, 2015 09:30AM

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.