Created QAID & QEID indices, now select time went down to .2787 seconds. 

Sorry about top-posting, it's a nice feature in gmail where it hides the 
text that was previously posted. 

Here is the updated explain result.

mysql> EXPLAIN
-> SELECT *
-> FROM QA
-> LEFT JOIN Batch
-> ON Batch.QAID=QA.ID
-> LEFT JOIN QAErrors
-> ON QAErrors.ID=Batch.QEID
-> WHERE QA.ID <http://QA.ID> BETWEEN '106805' AND '107179'
-> ORDER BY QA.ID <http://QA.ID>;
+----+-------------+----------+-------+---------------+---------+---------+-----
------------------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref
| rows | Extra |
+----+-------------+----------+-------+---------------+---------+---------+-----
------------------+------+-------------+
| 1 | SIMPLE | QA | range | PRIMARY | PRIMARY | 4 | NULL
| 692 | Using where |
| 1 | SIMPLE | Batch | ref | Index_1 | Index_1 | 5 | qcda
ta_dbo.QA.ID | 2 | |
| 1 | SIMPLE | QAErrors | ref | Index_2 | Index_2 | 4 | qcda
ta_dbo.Batch.QEID | 1 | Using index |
+----+-------------+----------+-------+---------------+---------+---------+-----
------------------+------+-------------+

Reply via email to