Long MySQL query, browser timeouts
Posted on 2014-07-28
I have one query that takes a very long time to process (very complicated select statement going thorugh lots of data) and my browser timeouts before it's finished. I can't do anything with the query so I need to keep the browser busy so it doesn't timeout. How do I do that?
I'm thinking I'll just let the query run in a separate thread and when it's done dump the result into a file. In the meantime, my browser will be repeatedly checking this file using ajax.
Is there a better solution? Can I just send back data to a browser so it doesn't timeout when it hangs on one query for a long time?