I have a MySQL Query.
When I run without derived table, the execution time is about 6 sec. However, if I run with derived table, the execution takes less than 1 sec. I have seen the EXPLAIN SELECT PLAN
of the query. I do not get much out of it. I can't add indexes on tables or use view or procedures.
However, I am not sure which query to move with derived query or simple query. AND does I need to consider the EXPLAIN result, or the actual execution time for selection of best option.