|
Posted by Erwin Moller on 12/17/10 11:54
Chris Thompson wrote:
> Hi All,
>
> I have a private website created using HTML/PHP. Within this site, there
> is a page that has a form (question.php), which is populated depending on
> the question number that has been posted to it.
>
> When the form is submitted, the data is posted back to the same page
> (question.php), and the code within the page saves the posted data, and
> displays the next question, and so it goes on...
>
> While the page loads almost instantly for the first 15 or so questions,
> the server response gets gradually slower, to the point where the page
> takes about 30 secs to start loading after about 18 questions.
>
> I'm trying to understand what may be causing the lag... It doesn't seem
> to be the loading of the page that's taking the time, it's the response
> time from the server before the page starts loading that seems to
> increase.
>
> The page does use MySQL tables, but all are well indexed, and as I say,
> you can load the page about 15 times, before any noticeable delay starts
> to happen.
>
> Anyone any ideas please?
>
> (I've put the complete site on 2 different servers - 1 on a shared hosting
> account, and 1 on completely different managed server, and the same thing
> happens on both servers!?).
>
> Thanks,
> Chris.
Hi Chris,
That indicates that your script has a higher workload the higher the
questionnumber is.
That could indicate that the script is doing more work for question number
20 than for question number 1.
Do you only perform the quesries needed?
Are you maybe 'counting' by doing subsequent databasequeries untill you
pulled the 'right' question from the table(s)?
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|