Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to show how many MySQL queries done?
Old 01-26-2008, 07:43 PM How to show how many MySQL queries done?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Hi,

How do u show how many mysql queries and generation time etc i have had a google but cant find it :s maybe im searching for the wrong thing.

anyone know how?

Thanks,
Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Old 01-26-2008, 07:53 PM Re: How to show how many MySQL queries done?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I don't know that there's automatic tracking. With a layer of abstraction you could increment a counter for each query done.

For tracking how long a script uses, use http://us3.php.net/manual/en/function.microtime.php as that will allow you to measure fractions of a second.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 01-28-2008, 03:00 AM Re: How to show how many MySQL queries done?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
If you used some object to query your database you could increment the queries counter, there is nothing more simple than that. If you do plain mysql_query() then you obviously will have to add the increment manually, but it is better to use some DB object.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 01-28-2008, 12:28 PM Re: How to show how many MySQL queries done?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
:s i really do need to figure out how to make a class for all db functions and convert the whole site over.. god too much work

Anyone know where i can get a SIMPLE db class which i idiot (aka me) can understand and use.

Thanks,
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-29-2008, 01:07 AM Re: How to show how many MySQL queries done?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
I use a self written class, but there is a PEAR:B class if I am not mistaken which provides almost the same functionality. Check out some phpclasses.org and pear.php.net.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 01-29-2008, 01:11 AM Re: How to show how many MySQL queries done?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Wtf? There initially was "PEAR : : DB"
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 01-29-2008, 02:34 AM Re: How to show how many MySQL queries done?
Average Talker

Posts: 21
Trades: 0
Is there a application program in your cPanel that tracks your MySQL queries.. I thought some of cPanel have this application..
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

jigolo is offline
Reply With Quote
View Public Profile
 
Old 01-29-2008, 02:38 AM Re: How to show how many MySQL queries done?
Average Talker

Posts: 21
Trades: 0
Or you maybe try this to optimized your mySQL queries..

http://dev.mysql.com/tech-resources/...alization.html

http://www.databasejournal.com/featu...le.php/1382791

hope this could be help you guys..
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

jigolo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to show how many MySQL queries done?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.27032 seconds with 12 queries