?
Solved

Set time limit on SQL query in mySQL

Posted on 2006-04-06
3
Medium Priority
?
986 Views
Last Modified: 2008-02-07
I have some new pages and every so often I get a query (usually during testing) that starts hogging the resource and all the other queries slow to a halt. I am wondering it there is a variable in mySQL that I can set to kill processes that are over a certain time limit. I use phpMyAdmin and see a "Time" column and the longer ones need to be killed. I would like for the DB to do this if they reach a certain limit.

Thanks

T
0
Comment
Question by:td234
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
todd_farmer earned 2000 total points
ID: 16392765
No, there is no way to do this automatically.  If the query is actively returning data (not idle), MySQL provides no mechanism to kill it after reaching a certain time threshold.
0
 
LVL 2

Author Comment

by:td234
ID: 16392975
Thanks once again Todd.
0
 
LVL 30

Expert Comment

by:todd_farmer
ID: 16392991
Sorry there's not a better answer - I expect we will see this type of enterprise-level administrative support pretty soon.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question