{"id":17255,"date":"2012-03-06T20:16:43","date_gmt":"2012-03-06T20:16:43","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/mysql-profiler\/"},"modified":"2012-03-06T20:16:43","modified_gmt":"2012-03-06T20:16:43","slug":"mysql-profiler","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/mysql-profiler\/","author":7798430,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"1.0","tested":"3.3.2","requires":"2.9","requires_php":"","requires_plugins":"","header_name":"MySQL Profiler","header_author":"Tom Benner","header_description":"","assets_banners_color":"","last_updated":"2012-03-06 20:16:43","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/mysql-profiler\/","header_author_uri":"https:\/\/github.com\/tombenner","rating":4.2,"author_block_rating":0,"active_installs":10,"downloads":7021,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":"1","2":0,"3":0,"4":0,"5":"4"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539439","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539439","resolution":"1","location":"plugin"}},"screenshots":{"1":"Profiling for a typical single post page, filtered to show only queries containing references to wp_posts and ordered by the time column to show the slowest queries at the top.","2":"Profiling for a typical single post page, with syntax highlighting turned off and the display of file and line numbers turned off (by setting MP_DISPLAY_FILES and MP_HIGHLIGHT_SYNTAX to false)."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[94,2679,1627,6246,23044],"plugin_category":[54,59],"plugin_contributors":[85113],"plugin_business_model":[],"class_list":["post-17255","plugin","type-plugin","status-publish","hentry","plugin_tags-debug","plugin_tags-debugging","plugin_tags-mysql","plugin_tags-profiler","plugin_tags-profiling","plugin_category-security-and-spam-protection","plugin_category-utilities-and-tools","plugin_contributors-tombenner","plugin_committers-tombenner"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/mysql-profiler.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/mysql-profiler\/trunk\/screenshot-1.png?rev=1539439","caption":"Profiling for a typical single post page, filtered to show only queries containing references to wp_posts and ordered by the time column to show the slowest queries at the top."},{"src":"https:\/\/ps.w.org\/mysql-profiler\/trunk\/screenshot-2.png?rev=1539439","caption":"Profiling for a typical single post page, with syntax highlighting turned off and the display of file and line numbers turned off (by setting MP_DISPLAY_FILES and MP_HIGHLIGHT_SYNTAX to false)."}],"raw_content":"<!--section=description-->\n<p>MySQL Profiler displays debugging information about SQL queries to admin WordPress users.  For each query, the profiler displays the time, syntax-highlighted SQL, and a trace of the functions (as well as the file and line number that the functions were called from) that were called.<\/p>\n\n<p>The list can be sorted by any of its columns, so you can, for example:<\/p>\n\n<ul>\n<li>Order the list by ID to see the chronological order of the queries<\/li>\n<li>Order the list by time to see the slowest queries<\/li>\n<li>Order the list by query to group the queries by type (SELECT, UPDATE, etc)<\/li>\n<li>Order the list by trace to group the queries by similar origins<\/li>\n<\/ul>\n\n<p>The list can also filtered by typing in the search box, so you can, for example:<\/p>\n\n<ul>\n<li>View all queries that use the wp_posts table<\/li>\n<li>View all queries that are related to the use of a function in taxonomy.php<\/li>\n<li>View all queries that are related to the use of a specific function or class<\/li>\n<li>View all queries that call a specific MySQL function<\/li>\n<\/ul>\n\n<p>To turn off syntax highlighting, put the following in wp-config.php:<\/p>\n\n<pre><code>define('MP_HIGHLIGHT_SYNTAX', false);\n<\/code><\/pre>\n\n<p>To omit the file and line number from the function trace and display the functions as a comma-separated list (to save vertical space), define the following in wp-config.php:<\/p>\n\n<pre><code>define('MP_DISPLAY_FILES', false);\n<\/code><\/pre>\n\n<p>This plugin was loosely based on <a href=\"http:\/\/bueltge.de\/\">Frank Bueltge<\/a>'s <a href=\"http:\/\/wordpress.org\/extend\/plugins\/debug-queries\/\">Debug Queries<\/a> plugin, so a hearty thanks to him for the development of that.<\/p>\n\n<p>If you'd like to grab development releases, see what new features are being added, or browse the source code please visit\/follow the <a href=\"http:\/\/github.com\/tombenner\/mysql-profiler\">GitHub repo<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Put <code>mysql-profiler<\/code> into the <code>wp-content\/plugins<\/code> directory<\/li>\n<li>Activate the plugin in the \"Plugins\" menu in WordPress to turn on the profiling<\/li>\n<li>Deactivate when you've finished using the profiling<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Is feature X available?<\/dt>\n<dd><p>If there's widely-needed functionality that you'd like that isn't implemented, I'd likely be willing to implement it myself or to accept any well-written code that implements it. Please feel free to either add a topic in the WordPress forum or contact me through GitHub for any such requests:<\/p>\n\n<ul>\n<li><a href=\"http:\/\/wordpress.org\/tags\/mysql-profiler?forum_id=10\">WordPress Forum<\/a><\/li>\n<li><a href=\"http:\/\/github.com\/tombenner\">GitHub<\/a><\/li>\n<\/ul><\/dd>\n\n<\/dl>","raw_excerpt":"Displays a list of each page&#039;s SQL queries and the functions calling them that can be searched and sorted by time, type, etc.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/17255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=17255"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/tombenner"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=17255"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=17255"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=17255"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=17255"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=17255"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=17255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}