Public feed
#887915
explain SELECT pl.*, p.affiliate FROM purchaseledger pl INNER JOIN purchase p ON pl.purchase_id=p.id
-> WHERE p.liveon >= '2008-01-25 00:00:00' and p.liveon <= '2008-02-01 23:59:59'
-> and pl.status='a'
-> and p.status<>'d'
-> order by created desc;
+----+-------------+-------+--------+-----------------------+---------+---------+---------------------------+--------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+-----------------------+---------+---------+---------------------------+--------+-----------------------------+
| 1 | SIMPLE | pl | ALL | purch_id | NULL | NULL | NULL | 343032 | Using where; Using filesort |
| 1 | SIMPLE | p | eq_ref | PRIMARY,status_liveon | PRIMARY | 4 | store_wtso.pl.purchase_id | 1 | Using where |
+----+-------------+-------+--------+-----------------------+---------+---------+---------------------------+--------+-----------------------------+
2 rows in set (0.00 sec)