List:General Discussion« Previous MessageNext Message »
From:Carlos Eduardo Caldi Date:April 28 2009 2:49pm
Subject:Copying to tmp table
View as plain text  
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 :
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     :
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?


Carlos Caldi 

Descubra seu lado desconhecido com o novo Windows Live!
Copying to tmp tableCarlos Eduardo Caldi28 Apr
  • RE: Copying to tmp tableDilip Kumar Parikh28 Apr