MySQL Forums
Forum List  »  Performance

Slow Query Urgent
Posted by: a m
Date: July 23, 2015 09:21AM


I have a BIG problem in MYSQL. I have this query:

DROP TABLE IF EXISTS estadistica.filtro_base_tmp;
CREATE TABLE estadistica.filtro_base_tmp
SELECT gestor_eventos_rsp.grupo_evento.EST_NOM,gestor_eventos_rsp.grupo_evento.TEV_NOM,gestor_eventos_rsp.grupo_evento.CLI_ID,sum(gestor_eventos_rsp.grupo_evento.GEV_CNT) as ACUM
FROM gestor_eventos_rsp.grupo_evento
WHERE gestor_eventos_rsp.grupo_evento.GEV_TSINI > DATE_SUB(CURDATE(),INTERVAL 7 DAY)
GROUP BY gestor_eventos_rsp.grupo_evento.EST_NOM,gestor_eventos_rsp.grupo_evento.TEV_NOM,gestor_eventos_rsp.grupo_evento.CLI_ID;
DROP TABLE IF EXISTS estadistica.filtro_base;
RENAME TABLE estadistica.filtro_base_tmp TO estadistica.filtro_base;

The problem is this statement in the query: DROP TABLE IF EXISTS estadistica.filtro_base;

I see the statement of the query in slow querys table for a long time.
I execute this query each 5 minutes and this is a random problem.

Sometimes i have the same query in the same time because the previous execution don't finished and that reason block my app.

Please help me!

Options: ReplyQuote

Written By
Slow Query Urgent
a m
July 23, 2015 09:21AM
July 23, 2015 10:19AM
July 24, 2015 04:00PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.