It is said that the number of rows are scanned is smaller the performance is higher when use Explain to optimize query. So I wonder
- When the EXPLAIN output includes many rows, is there any formula to calculate the total number of rows which is scanned? After searching on internet, it seems the total number of rows is the product of values of all rows in EXPLAIN output. But does it makes sense in case we use UNION?
- Are there another criteria we should combine with 'rows' column in EXPLAIN output to know performance of query? Because if the formula is multiplying all number of rows, there are some cases the time execute the query is faster but the total number of rows is scanned is larger.