-----Ursprüngliche Nachricht----- 
Von: "Victoria Reznichenko" <[EMAIL PROTECTED]>
An: <[EMAIL PROTECTED]>
Gesendet: Dienstag, 22. Juli 2003 11:56
Betreff: Re: Limiting query time


> Troy Hakala <[EMAIL PROTECTED]> wrote:
> > Is it possible to limit the query time in MySQL (3.x or 4.0)? For 
> > example, I'd like to have any query that takes more than a specified 
> > number of seconds just quit automatically. Seems dumb, but on a web 
> > site, nobody is going to wait minutes for a query to return so they 
> > refresh anyway. So on a busy server, MySQL ends up with several queries 
> > running that all take a long time to finish which compound to make it 
> > even slower. A simple time limit would solve the problem. Yes, I know 
> > that the queries should take less time, but again, on a busy server, 
> > sometimes the longer queries do take a long time (10 minutes or more) 
> > to complete.
> 
> No, there is no option for limiting query time.
> 

i have seen an option in phpmyadmin, that sets the maximum php script execution time 
and titles this to be the maximum query time.
now what happens when php is terminated while waiting for a query? i guess, mysql 
server connection is terminated. and is it right that mysql aborts the query execution 
at this time?
so i could do this in any other program, too, i guess. just terminate the connection 
after a given time and now we have our maximum execution time.
of course, we get no result back then, but it wasn't finished anyway.

-yves


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to