[wp-trac] Re: [WordPress Trac] #9642: Database Schema Optimizations
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 24 23:00:34 GMT 2009
#9642: Database Schema Optimizations
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: Denis-de-Bernardy
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: Optimization | Version: 2.8
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
Comment(by Denis-de-Bernardy):
useful debugging code, after the require in wp-config.php:
{{{
function dump_queries() {
global $wpdb;
foreach ( $wpdb->queries as $query ) {
echo '<pre style="text-align: left; padding: 10px; border:
solid 1px #000;">' . "\n";
var_dump($query);
echo '</pre>' . "\n";
}
}
if ( defined('SAVEQUERIES') && defined('QUERIES_DEBUG') ) {
add_action('wp_footer', 'dump_queries');
add_action('admin_footer', 'dump_queries');
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9642#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list