Forum Moderators: coopster

Message Too Old, No Replies

page waits for ages while stored procedure runs

         

jackvull

9:59 am on Jul 15, 2008 (gmt 0)

10+ Year Member



I have a PHP page where a user clicks a button and it runs some stored procedures on the database server.
One of these procedure stakes 3minutes to run, so to the user it look slike the page is not doing anything even though the IE bar at the bottom is slowly moving.
Is there a better way I could present this to the user, something more friendly like a progress bar or heartbeat on the server?

topr8

10:09 am on Jul 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i think you should be looking at optimising the database, i should have thought 3 mins to run even a complicated sp with a bunch of recursive queries is quite long.

as a direct answer to your question, i'm not sure about apache but can't you send some data before the page has finished processing on the server, like a simple javascript or flash movie that shows a (fake) progress bar on the screen, you know it takes about 3 mins so make an appropriate progress bar with flash or js.

jackvull

10:31 am on Jul 15, 2008 (gmt 0)

10+ Year Member



It's because of bulk uploads and processing, I'm sure it could be optimised a bit but it will still take a while.

[edited by: coopster at 1:15 am (utc) on July 26, 2008]
[edit reason] removed link to non-authoritative site [/edit]