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
4303
December 01, 2010 05:23AM
1081
December 01, 2010 02:54PM
1164
December 02, 2010 12:27AM
1075
December 03, 2010 05:54AM
1055
December 03, 2010 08:05AM
992
December 03, 2010 08:46AM
1010
December 03, 2010 11:59AM
1043
December 03, 2010 01:52PM
1059
December 03, 2010 02:23PM
941
December 03, 2010 02:32PM
1024
December 03, 2010 03:20PM
898
December 03, 2010 09:21PM
1029
December 04, 2010 01:52AM
2219
December 04, 2010 11:44AM