MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jennifer Goodie Date:March 19 2003 6:13pm
Subject:RE: Strange problem on the difference of mysql connection between cgi and shell
View as plain text  
It is not strange, it is expected behavior.  A browser can only handle so
many lines of html before getting all wonky.  Running a query that takes
over 5 minutes to run in a web application is a bad idea, no one is going to
want to sit there and wait for it and if there is no output for an extended
period of time newer browsers will be "helpful" and re-request the page,
causing lock issues and such.  I would suggest trying to speed up the query,
you need to make sure you are using indexes. or you might need to use
summary tables.  You will also want to only display a portion of your result
set at a time as 10,000 records is probably going to crash browsers.  You
will also need to flush output to prevent the browser from re-requesting,
you also might want to put something in to prevent the user from hitting
reload (such as checking at the beginning to see if the query is already
running, most of the time web users do not understand that for every time
they hit reload their wait time is going to increase.



-----Original Message-----
From: Liu Haifeng [mailto:lhaifeng@stripped]
Sent: Tuesday, March 18, 2003 7:23 PM
To: mysql@stripped
Subject: Strange problem on the difference of mysql connection between
cgi and shell


Hi,

I am coding a cgi program to query the records from the mysql tables.  When
I execute the sql query (which is a join operation on two tables) in the
mysql shell, the results are shown correctly.  However, if I use cgi script
to execute the same query, the web browser just crashed after a while (5 or
6 minutes which is the same as the query execution time ).   I am guessing
the problem is relevant to the larger result (more than 10,000 records),
because if I execute the query against another two tables which have the
same structure but contain the less records, both cgi script and shell
method can work.

So anybody can help me figure out the problem?  I have adjusted the
configuration of mysqld to be a huge one but still failed.

Regards
Haifeng Liu

Thread
Strange problem on the difference of mysql connection between cgi and shellLiu Haifeng19 Mar
  • RE: Strange problem on the difference of mysql connection between cgi and shellJennifer Goodie19 Mar