Number of requests SQL

5 posts by 2 authors in: Forums > CMS Builder
Last Post: November 26, 2008   (RSS)

By Djulia - November 25, 2008

Hi,

It would be possible to know the number total of requests SQL on the public pages ( pageList.php and pageDetail.php ) ?

For example :
Homepage :154 query SQL
Story : 106 query SQL
etc..

An idea ?

Thanks for your assistance.

Djulia

Re: [Djulia] Number of requests SQL

By Dave - November 25, 2008

Hi Djulia,

Do you want to create a hit counter? You can do that like this:

Create a field called 'hits' (or whatever you want to call it) add this in your page. Then use this code. This first field is the tablename, the second field is the fieldname, and the third field is the record number

<?php incrementCounterField('news', 'hits', $newsRecord['num']); ?>

Or do you want to know the number of SQL queries executed? (If so, curious what for?)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Number of requests SQL

By Djulia - November 25, 2008 - edited: November 25, 2008

Hi Dave,

Thank you Dave for your answer.

>> Or do you want to know the number of SQL queries executed?[/#800000]
Yes, I seek to obtain the number of requests SQL.

We are on a mutualized server and we wish to be able to check if slownesses are caused by server SQL or the file server.
It is objective information and which enables me to exchange with our ISP (...)

You think that it is possible ?
I think that it is necessary to create a function PHP ?
Or, there is perhaps a extension for Firefox ?

Thanks,

Djulia[font "Times New Roman"][font "Times New Roman"]

Re: [Dave] Number of requests SQL

By Djulia - November 26, 2008 - edited: November 26, 2008

Thank you Dave, [:)]

That functioned well, and other customers also informed them of the problem.
Our ISP thus took time to look at. There was a problem of memory (ram) on server SQL.
They will do what is necessary.

Sometimes, they have a little difficulties for hearing the customers…

We preciously keep your file for the future.

Thanks,

Djulia