[mydb]>analyze select * from tbl2, tbl1 where tbl2.varchar_col_2='someval' and tbl1.varchar_col_2='someval' and tbl2.varchar_col1=tbl1.varchar_col1 and tbl1.char_col_1='Y' and tbl1.int_col_2 < 58 and tbl1.date_col1 < '2004-01-01' order by tbl1.datetime_col1, tbl1.int_col_1;
|
+------+-------------+--------+------+------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+--------------+-------------------------+--------+-----------+----------+------------+----------------------------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
|
+------+-------------+--------+------+------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+--------------+-------------------------+--------+-----------+----------+------------+----------------------------------------------+
|
| 1 | SIMPLE | tbl2 | ref | PRIMARY,tbl2_varchar_col_2 | tbl2_varchar_col_2 | 32 | const | 892048 | 870220.00 | 100.00 | 100.00 | Using where; Using temporary; Using filesort |
|
| 1 | SIMPLE | tbl1 | ref | tbl1_varchar_col1,tbl1_date_col1,tbl1_varchar_col_2,tbl1_char_col_1,tbl1_varchar_col1_datetime_col1_varchar_col_2_char_col_1 | tbl1_varchar_col1_datetime_col1_varchar_col_2_char_col_1 | 102 | mydb.tbl2.varchar_col1 | 1 | 6.41 | 28.12 | 0.00 | Using where |
|
+------+-------------+--------+------+------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+--------------+-------------------------+--------+-----------+----------+------------+----------------------------------------------+
|
2 rows in set (50.94 sec)
|