parser

Написать ответ на текущее сообщение

 

 
   команды управления поиском

почему вдруг filesort?

Larrikin 28.05.2008 02:23

почем на одной странице два подряд запроса дают разный EXPLAIN?
TYPE: hash
INFO: 110.353 ms/8 KB/0 blocks
ROWS: 23
QUERY:
SELECT site_id, AVG(rate) as rate FROM stat_ya WHERE word_id = 14 AND rate_date < '2008-01-27 01:18:52' AND rate_date > '2007-12-28 01:18:52' AND site_id IN (6,5,2,9,13,24,317,11,136,7,220,18,10,764,42,15,14,16,235,32,871,271,918,33,19,215,1194,263,1069,1269) GROUP BY site_id
EXPLAIN:
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra	
1	SIMPLE	stat_ya	range	ix_uniq,site_id	site_id	4		19848	Using where	


TYPE: hash
INFO: 4.771 ms/12 KB/0 blocks
ROWS: 16
QUERY:
SELECT site_id, AVG(rate) as rate FROM stat_ya WHERE word_id = 14 AND rate_date < '2007-12-28 01:18:53' AND rate_date > '2007-07-29 02:18:53' AND site_id IN (6,5,2,9,13,24,317,11,136,7,220,18,10,764,42,15,14,16,235,32,871,271,918,33,19,215,1194,263,1069,1269) GROUP BY site_id
EXPLAIN:
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra	
1	SIMPLE	stat_ya	range	ix_uniq,site_id	ix_uniq	4		728	Using where; Using temporary; Using filesort