Public feed
#526854
explain select month,count(*) from domains where us > 0 group by month;
+----+-------------+-------------+------+---------------+------+---------+------+----------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------------+------+---------------+------+---------+------+----------+----------------------------------------------+
| 1 | SIMPLE | domains | ALL | NULL | NULL | NULL | NULL | 49140069 | Using where; Using temporary; Using filesort |
+----+-------------+-------------+------+---------------+------+---------+------+----------+----------------------------------------------+
1 row in set (0.00 sec)
(root@localhost) [domains]> select month,count(*) from domains where us > 0 group by month;
+--------------+----------+
| month | count(*) |
+--------------+----------+
| January 2007 | 121325 |
| March 2007 | 107 |
+--------------+----------+
2 rows in set (19.56 sec)
(root@localhost) [domains]> select month,count(*) from todo.ovt left join domains using(domain) where us > 0 ;
+--------------+----------+
| month | count(*) |
+--------------+----------+
| January 2007 | 121325 |
| March 2007 | 310485 |
+--------------+----------+
2 rows in set (55.36 sec)