Reply
How to Count the queries done by a page
Old 04-29-2008, 12:12 PM How to Count the queries done by a page
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
I've noticed at the bottom of sites stuff like " site loaded with 15 queries" and I want to know how to get the number of queries done by a page.
__________________
My webmaster news & tips blogs with free scripts and tutorials - http://ap-gfx.com
andyp is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-29-2008, 12:18 PM Re: How to Count the queries done by a page
Super Talker

Posts: 122
You could probably just set a session variable, and every time a query is executed, increment the session variable. (while loops do multiple queries)

I've never really done this before, so I might be mistaken.

also, while we're in here, maybe somebody can tell me how to check how efficient the queries are running or whatnot. The time it takes to query, etc. All the stuff you would want to know.
kbfirebreather is offline
Reply With Quote
View Public Profile
 
Old 04-29-2008, 01:39 PM Re: How to Count the queries done by a page
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Well as far as I know you should only get the fields you need and just reduce your queries to the bare minium.
Check out:
http://www.devshed.com/c/a/MySQL/Enhancing-MySQL-Query-Efficiency/3/

http://www.informit.com/articles/article.aspx?p=377652
__________________
My webmaster news & tips blogs with free scripts and tutorials - http://ap-gfx.com
andyp is offline
Reply With Quote
View Public Profile
 
Old 05-31-2008, 02:06 AM Re: How to Count the queries done by a page
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
I know this is an older thread, but I've read a few requests for something like this, so I wrote an article and put it up on my site. I hope this helps you: http://www.teratask.com/index.php?pa...-count-queries
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to How to Count the queries done by a page
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13562 seconds with 12 queries