Long query locking up MySQL Server
Hey,
I'd like to review my attitude to one problem.
I have a database with approx. 1M records in a MyISAM table, but that is not important I think.
The thing is. A Web Application is running a query on a database, that is using filesort,where,temporary.
This query takes appros 1200s to complete (at least).
After this SELECT is executed, it gets stored in CACHE, which is good.
However, when the server is restarted, and the query has to be cached first, then the web application piles up those queries ending up with number of those queries(exactly the same) running and the machine load going sky high.
Eventually, the server locks up.
How to avoid that situation? Any good practices?
My idea is that the web application has to check if that query is being executed but... maybe that can be achieved somehow on mysql level?
Thanks for help.
Subject
Views
Written By
Posted
Long query locking up MySQL Server
4297
December 01, 2010 05:23AM
1080
December 01, 2010 02:54PM
1162
December 02, 2010 12:27AM
1073
December 03, 2010 05:54AM
1052
December 03, 2010 08:05AM
990
December 03, 2010 08:46AM
1008
December 03, 2010 11:59AM
1041
December 03, 2010 01:52PM
1058
December 03, 2010 02:23PM
935
December 03, 2010 02:32PM
1023
December 03, 2010 03:20PM
895
December 03, 2010 09:21PM
1027
December 04, 2010 01:52AM
2207
December 04, 2010 11:44AM