Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Number of requests SQL

 

 


Djulia
User

Nov 25, 2008, 3:20 AM

Post #1 of 5 (555 views)
Shortcut
Number of requests SQL Can't Post

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


Dave
Staff / Moderator


Nov 25, 2008, 9:24 AM

Post #2 of 5 (550 views)
Shortcut
Re: [Djulia] Number of requests SQL [In reply to] Can't Post

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


Djulia
User

Nov 25, 2008, 11:05 AM

Post #3 of 5 (547 views)
Shortcut
Re: [Dave] Number of requests SQL [In reply to] Can't Post

Hi Dave,

Thank you Dave for your answer.

>> Or do you want to know the number of SQL queries executed?
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


(This post was edited by Djulia on Nov 25, 2008, 11:41 AM)


Dave
Staff / Moderator


Nov 25, 2008, 4:30 PM

Post #4 of 5 (535 views)
Shortcut
Re: [Djulia] Number of requests SQL [In reply to] Can't Post

Hi Djulia,

How slow is it? You can display the total time at the bottom of the page like this:

<?php showExecuteSeconds() ?> seconds

CMS Builder does do some extra MySQL queries, and you can reduce those if needed. But it's likely the web host since CMS Builder is fast on many other hosts.

In our experience the best way to convince a web host is to write a short script that demonstrates the problem so they can't blame it on the software. I've attached a script I recently wrote the times the MySQL connection speed. (This may or may not be the problem).

On the client's host I wrote this for it took 9 seconds just to connect to MySQL - not even to run any queries.

Try this one, just change the login info at the top. Then let me know what happens.

Dave Edis - Senior Developer
interactivetools.com
Attachments: test-mysql.php (1.17 KB)


Djulia
User

Nov 26, 2008, 6:16 AM

Post #5 of 5 (527 views)
Shortcut
Re: [Dave] Number of requests SQL [In reply to] Can't Post

Thank you Dave, Smile

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



(This post was edited by Djulia on Nov 26, 2008, 6:20 AM)

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4