int(1) does not mean what you think. Probably you want TINYINT UNSIGNED.
int(25), bigint(250) -- Eh?
INT is always 4 bytes (32-bits); BIGINT is always 8 bytes.
Use UNSIGNED wherever appropriate.
You have DATETIME and TIMESTAMP. Keep in mind that TIMEZONE is timezone-aware;
DATETIME is not.
100 is tantamount to turning off the log. I prefer 2.
select count(ENTITY_NAME)
from ALERT_EVENTS
where EVENT_TIME date_sub(now(),INTERVAL 60 MINUTE)
and status=upper('failed')
and ENTITY_NAME='FETL-ImpressionRC-conversion';
begs for the _compound_ index
Actually that query is not my concern :
i have a query that is taking so much time :
Slow Log Output :
# Overall: 195 total, 16 unique, 0.00 QPS, 0.31x concurrency _
# Time range: 2012-09-01 14:30:01 to 2012-09-04 14:13:46
# Attribute total min max avg 95%