Comment 9 for bug 1362212

Revision history for this message
Steffen Boehme (boemm) wrote :

Some statements which are related ...
We got this both queries:

mysql> explain select count(downloadco0_.id) as col_0_0_ from DownloadConfirmation downloadco0_ where downloadco0_.platform='EU' and downloadco0_.fulfillerId='5' and (downloadco0_.downloadCompleted is null);
+----+-------------+--------------+------+--------------------------------+--------------------------------+---------+-------------+--------+------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+------+--------------------------------+--------------------------------+---------+-------------+--------+------------------------------------+
| 1 | SIMPLE | downloadco0_ | ref | platformFulfillerIdExecutionId | platformFulfillerIdExecutionId | 773 | const,const | 403364 | Using index condition; Using where |
+----+-------------+--------------+------+--------------------------------+--------------------------------+---------+-------------+--------+------------------------------------+
1 row in set (0.00 sec)

mysql> explain select downloadco0_.id as id1_9_, downloadco0_.attempts as attempts2_9_, downloadco0_.dateCreated as dateCrea3_9_, downloadco0_.dateModified as dateModi4_9_, downloadco0_.downloadCompleted as download5_9_, downloadco0_.downloadStarted as download6_9_, downloadco0_.executionId as executio7_9_, downloadco0_.fileId as fileId8_9_, downloadco0_.fileSize as fileSize9_9_, downloadco0_.fulfillerId as fulfill10_9_, downloadco0_.platform as platfor11_9_ from DownloadConfirmation downloadco0_ where downloadco0_.platform='EU' and downloadco0_.fulfillerId='12' and downloadco0_.executionId='103906' and (downloadco0_.downloadCompleted is not null) order by downloadco0_.downloadCompleted asc limit 1;
+----+-------------+--------------+------+--------------------------------+--------------------------------+---------+-------------------+------+----------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+--------------+------+--------------------------------+--------------------------------+---------+-------------------+------+----------------------------------------------------+
| 1 | SIMPLE | downloadco0_ | ref | platformFulfillerIdExecutionId | platformFulfillerIdExecutionId | 824 | const,const,const | 977 | Using index condition; Using where; Using filesort |
+----+-------------+--------------+------+--------------------------------+--------------------------------+---------+-------------------+------+----------------------------------------------------+
1 row in set (0.00 sec)