I\'ve got a basic MySQL performance question related to explain. I have two queries that return the same result and I am trying to understand how to make sense of the EXPL
In fact when you see you should not to multiply, but sum this numbers. In you case compare (49520 x 413 x 4) and (50000 + 49520).
Gereral rule is simple: summarize all segments (DERIVED, PRIMARY) and multiply rows within each segment.
id select_type ... rows
1 PRIMARY 1
1 PRIMARY 2
2 DERIVED 3
2 DERIVED 4
3 DERIVED 5
3 DERIVED 6
Complexity is: 1*2 + 3*4 + 5*6