RE: How to Cancel SQL Queries when Browser stops loading page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> We sometimes experience slow ups because users who run queries via a
> browser
> are retrying or stopping the query (by hitting the reload or stop
buttons
> on the browser)
> before the queries complete.
> 
> This causes the creation multiple mysql processes each of which are
> running queries that will
> send their results out to the bit bucket.  Also, these "unattached"
> queries seem to run for much
> longer than if they are still part of a http session.  I tried turning
off
> persistent mysql connections
> to no avail.  I tried registering a shutdown function to call
> mysql_close(), hoping this would stop the queries.
> This also seemed to have no effect.
> 
> Is there a way to cancel  out these sql queries when the user hits
stop or
> reload from the browser
> or to otherwise prevent the slowup that occurs when they do this?
> I am not sure whether this is more of a php or mysql issue.
> 
> We are using PHP and MYSQL on a Sun running Apache, but it works the
same
> way on my Linux box.
> 
> PHP Version 4.0.6, Mysql Client API 3.23.24-beta, Mysql Version
3.23.40.

Don't know of any way to change this with PHP. Once MySQL receives the
query it starts executing it until done.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux