{"id":481,"date":"2007-03-03T12:53:39","date_gmt":"2007-03-03T17:53:39","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree"},"modified":"2007-03-03T12:54:43","modified_gmt":"2007-03-03T17:54:43","slug":"mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree","status":"publish","type":"post","link":"https:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree","title":{"rendered":"MySQL, with SHOW PROFILE and updated INFORMATION_SCHEMA, built from the Community tree"},"content":{"rendered":"<p>I just built mysql-5.0-community, on my T7200 with 2GB of RAM (on Fedora Core 6), and it only took a mere:<\/p>\n<pre>real&nbsp;&nbsp;&nbsp; 7m51.127s\n\nuser&nbsp;&nbsp;&nbsp; 3m13.836s\n\nsys&nbsp;&nbsp;&nbsp;&nbsp; 2m19.803s\n<\/pre>\n<p>The obligatory <code>make test<\/code> was run, and that was also pretty quick:<\/p>\n<pre>All 455 tests were successful.\n\nThe servers were restarted 109 times\n\nSpent 1134.052 seconds actually executing testcases\n\n<\/pre>\n<p>Maybe we could have a competition to see how fast MySQL builds (under 8 minutes) and tests (under 19 minutes), something similar to the <a href=\"http:\/\/es.tldp.org\/Presentaciones\/200211hispalinux\/blanchard\/talk_2.html\">7-second Linux kernel compile<\/a>. With that it looks like 5.0.37 might make its way to the surface really soon now, since 5.0.35 was pending a release, before we canned that.<\/p>\n<p>Why is MySQL Community Server 5.0.37 significant? Because it contains Jeremy Cole&#8217;s SHOW PROFILE feature. Notice how thats not just a patch any longer, its a feature, from the community, that&#8217;s been implemented in the MySQL Community Server release. Chad Miller (in Community Engineering) also extended the then patch further, and now you can also get said information via the INFORMATION_SCHEMA (look at the PROFILING table in the INFORMATION_SCHEMA).<\/p>\n<p>Profiling isn&#8217;t enabled by default (check via: <tt>show variables like 'profiling';<\/tt>), so you&#8217;d do well to <tt>set profiling='on';<\/tt>. Once that is done, you can just execute SHOW PROFILE; to be greeted by the feature. Using the INFORMATION_SCHEMA database, and something like: <tt>select duration,source_function,source_file from profiling;<\/tt> I can see how much time MySQL takes to execute a function like the mysql_select or how long it takes to do open_tables &#8211; best of all, I can see which source file I might want to edit if need be.<\/p>\n<p>I&#8217;m told this does not work on Windows, or Solaris (?), because they don&#8217;t have the getrusage() syscall, but it should probably work just fine on OS X based MySQL servers.<\/p>\n<p>Technorati Tags: <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/mysql\" rel=\"tag\">mysql<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/SHOW%20PROFILE\" rel=\"tag\">SHOW PROFILE<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/profiling\" rel=\"tag\">profiling<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/mysql%20community\" rel=\"tag\">mysql community<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/mysql%205.0.37\" rel=\"tag\">mysql 5.0.37<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/timing%20builds\" rel=\"tag\">timing builds<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just built mysql-5.0-community, on my T7200 with 2GB of RAM (on Fedora Core 6), and it only took a mere: real&nbsp;&nbsp;&nbsp; 7m51.127s user&nbsp;&nbsp;&nbsp; 3m13.836s sys&nbsp;&nbsp;&nbsp;&nbsp; 2m19.803s The obligatory make test was run, and that was also pretty quick: All 455 tests were successful. The servers were restarted 109 times Spent 1134.052 seconds actually executing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[23],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-mysql"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p4vJD-7L","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":0,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}