Hi friends

I have a proble with Copying to tmp table with large tables, table have more 
than 3 million rows


EXPLAIN da Query :

Table         : log0904
Type          : ref
Possible_keys : 
data_login_tplig,emp_grp_login_dtlig,grp_tiporeg_tipolig_dtlig,grp_dtlig_tplig,dtlig_num,grp_equipe_emp_dtlig
Key           : grp_tiporeg_tipolig_dtlig
Key_Len       : 7
Ref           : const
Rows          : 11554
Extra         : Using where; Using temporary; Using filesort

I kill my queries with more than 60 seconds

Time (sec) : 75
User     : logs
Maquina     : 192.168.0.76:43947
BD          : logs
Thread      : 18811390
State       : Copying to tmp table
Query       : SELECT tipo_atendimento ,login_operador,sum(duracao_operador) as 
duracao_operador, count(*)as total FROM log0904 Where   grupo = '1172' AND  
data_ligacao = '2009-04-27' and hora_ligacao_ini between '17:00:00' and  
'17:59:59'  AND empresa = 'EXTREME-U'   AND tipo_registro in ('L','T') GROUP BY 
tipo_atendimento,login_operador


Somebody kwons a kind of tunning can I do?

Thanks


Carlos Caldi 




_________________________________________________________________
Descubra seu lado desconhecido com o novo Windows Live!
http://www.windowslive.com.br

Reply via email to