mySQL ORDER BY in joined tables
Ok, so i have the following schema and query which is very slow (when using real data) because of the ORDER BY:
http://sqlfiddle.com/#!2/5e7bb/8
As per mysql man : "You are joining many tables, and the columns in the ORDER BY are not all from the first nonconstant table that is used to retrieve rows. (This is the first table in the EXPLAIN output that does not have a const join type.) "
but i still need to sort by that column. How would i need to do this ?
Ok, so i have the following schema and query which is very slow (when using real data) because of the ORDER BY:
http://sqlfiddle.com/#!2/5e7bb/8
As per mysql man : "You are joining many tables, and the columns in the ORDER BY are not all from the first nonconstant table that is used to retrieve rows. (This is the first table in the EXPLAIN output that does not have a const join type.) "
but i still need to sort by that column. How would i need to do this ?
No comments:
Post a Comment