|
|
If you are running a Wordpress blog, you might want to keep a keen eye on its plugins to know how many queries and the time required to process them they are producing on your web pages. This is particular useful if you are trying to optimize your database in order to save the resources your server has assigned to your blog. Here is a simple code to add to your blog’s pages.
Just add this code wherever you want within your blog’s theme (usually it is added to single.php and page.php files):
<?php echo $wpdb->num_queries; ?> <?php _e(‘queries’); ?>. <?php timer_stop(1); ?> <?php _e(’seconds’); ?>
If you want to know a little more about this code, I have dissected it below, describing what the single pieces do:
- <?php echo $wpdb->num_queries; ?> = display the number of queries the page has got.
- <?php timer_stop(1); ?> = returns the time to process the page.
Tags: trick, WebTalk, Wordpress
Related Articles
Latest Articles
If you can not find what you are looking for, you might want to try Google Advanced Search and get thousands of results, specifically selected for you.
Google Advanced Search
|
Leave a Comment
Incoming Search Terms for the Article:
php show db queries blog -Best screen resolution 1280x800 or higher.
Web Talk is best viewed in Firefox.

Comments
How to stop Windows 7 reboot loop: No dear, it didn’t work… I think that the annoying...
How to Install Windows Calendar in Windows 7: I tried many times, but failed to download. could you please send...
How to Really Make your Internet Surfing Anonymous and Private: Good article! I’m using vpntunnel.se to surf...
How to watch a YouTube video in slow motion: I don’t know how to do? How to use this software? I want to slow a...
How to stop Windows 7 reboot loop: did not work for me. instead of a reboot now i get a blue screen every 2 hours. time to...
Web Talk Promotion! Win 10 Easeus Data Recovery Wizard Professional Software and Save $90!: Just found this promo offer...
Windows cannot access the specified device, path or file. : Try this other solution. Let me know!
Windows cannot access the specified device, path or file. : Hi just wanted to say thanks for your help, but I’ve...
Windows cannot access the specified device, path or file. : No that didn’t work either! I get the first error...
Windows cannot access the specified device, path or file. : Im probably being a bit dim here but Im a pc novice, not...