MySQL Forums
Forum List  »  Performance

Long query locking up MySQL Server
Posted by: Radek Antoniuk
Date: December 01, 2010 05:23AM

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.

Options: ReplyQuote


Subject
Views
Written By
Posted
Long query locking up MySQL Server
4041
December 01, 2010 05:23AM
1087
December 02, 2010 12:27AM
905
December 03, 2010 08:46AM
810
December 03, 2010 09:21PM
2079
December 04, 2010 11:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.