I am running a query:
SELECT * FROM message where fr_user = 1 ORDER BY created DESC LIMIT 10;
Without the LIMIT there would be 170 rows returned where fr_user = 1;
I am now trying to understand how efficient this query (not trying to improve the query, just to see how efficient it CURRENTLY is) is.
I have ran the query and looked at the execution plan:
In the execution plan there is a query cost of 43.00... what does this mean/how is it calculated?
What do the four fields (Read, Eval, Prefix, DataRead) mean?
Why does the ratio of rows examined to the ratio of rows produced = 100% when there are 170 rows examined and 10 rows produced? I have an index (fr_user, created) so why are all the rows (170) being examined? If I have to examine all the rows it would seem pointless to have an index then?