WPDB Profiling is a great plugin to examine the database query load times for your wordpress themes and plugins. It helps identify poorly written themes and plugins which make unwanted or excessive database calls, thereby dramatically increasing the page load times.
How it works
WPDB makes use of the $wpdb object in wordpress which can store an array of queries along with the time it takes to execute them. To enable this, you must add the followig code in the wp-config.php file (this should generally be updated by default).
define( 'SAVEQUERIES', true );
WPDB displays the total number of queries made to render each page along with execution time taken by each database query at the end of each wordpress page/post. It also list down the individual SQL statements and function call used to execute the queries.
If you see a plugin/theme with high number of similar queries or small number of really slow queries (consuming high amount of times), then you should consider disabling and replacing the plugin/theme.
Installation and Usage
1. Install WPDB Profiling from WordPress plugin directory and activate it
2. Database profiling can be setup to display auto or by using “?show_queries=yes” in the parameter URL. You can activate the service for your wordpress users based on their permission level.
3. Additionally, the settings page allows you to disable “Auto Saving” and “Post Revisions”.
Download
a>
br>
a>
br>