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
4041
December 01, 2010 05:23AM
996
December 01, 2010 02:54PM
1087
December 02, 2010 12:27AM
987
December 03, 2010 05:54AM
968
December 03, 2010 08:05AM
905
December 03, 2010 08:46AM
909
December 03, 2010 11:59AM
958
December 03, 2010 01:52PM
973
December 03, 2010 02:23PM
858
December 03, 2010 02:32PM
931
December 03, 2010 03:20PM
810
December 03, 2010 09:21PM
944
December 04, 2010 01:52AM
2079
December 04, 2010 11:44AM