tharmstrong / allradiosailboats

RC Sailboat Database
0 stars 0 forks source link

Remove known slow queries from email performance alerts #184

Closed tharmstrong closed 4 years ago

tharmstrong commented 4 years ago

Query for daily Popular boats update is slow: INSERT INTO popu (boat_id,popu_qtty,popu_set) SELECT hits_what_id,count(*) as qtty,53 as theset FROM hits WHERE hits_what='boat' AND hits_timestamp>now()-31536000 GROUP BY hits_what_id ORDER BY qtty DESC LIMIT 30

Don't see how to optimize as there already is database index on required columns.

Current alerts use threshold of .5sec. Should add alternative alerts up to 5sec for expected slow queries.

tharmstrong commented 4 years ago

DONE added parameter to swith to higher threshold for specific querues.