{"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":"http:\/\/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<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"mailto:?subject=%5BShared%20Post%5D%20MySQL%2C%20with%20SHOW%20PROFILE%20and%20updated%20INFORMATION_SCHEMA%2C%20built%20from%20the%20Community%20tree&body=http%3A%2F%2Fwww.bytebot.net%2Fblog%2Farchives%2F2007%2F03%2F03%2Fmysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree&share=email\" target=\"_blank\" title=\"Click to email a link to a friend\" data-email-share-error-title=\"Do you have email set up?\" data-email-share-error-text=\"If you&#039;re having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself.\" data-email-share-nonce=\"b52c59d7f0\" data-email-share-track-url=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=email\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-481\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-481\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-481\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","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<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"mailto:?subject=%5BShared%20Post%5D%20MySQL%2C%20with%20SHOW%20PROFILE%20and%20updated%20INFORMATION_SCHEMA%2C%20built%20from%20the%20Community%20tree&body=http%3A%2F%2Fwww.bytebot.net%2Fblog%2Farchives%2F2007%2F03%2F03%2Fmysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree&share=email\" target=\"_blank\" title=\"Click to email a link to a friend\" data-email-share-error-title=\"Do you have email set up?\" data-email-share-error-text=\"If you&#039;re having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself.\" data-email-share-nonce=\"b52c59d7f0\" data-email-share-track-url=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=email\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-481\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-481\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-481\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2007\/03\/03\/mysql-with-show-profile-and-updated-information_schema-built-from-the-community-tree?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_options":[]},"categories":[23],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4vJD-7L","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":674,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/11\/29\/mysql-linux-ppc64-binaries","url_meta":{"origin":481,"position":0},"title":"MySQL Linux PPC64 binaries","date":"29\/11\/2007","format":false,"excerpt":"A while back, I built some PPC64 (powerpc 64-bit) packages for MySQL. They were built on a POWER5 box, running Fedora Core 6, with glibc 2.5, using a Bitkeeper snapshot (public bkbits, 5.0.45 tag). All tests pass on ppc64, for what its worth. I'll do periodic builds for Linux\/PPC64 as\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":535,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/04\/26\/lightning-talks-with-community-contributors","url_meta":{"origin":481,"position":1},"title":"Lightning talks with Community Contributors","date":"26\/4\/2007","format":false,"excerpt":"I think this was a really interesting talk (because of all the contributors talking), and my only minor complaint was that it was up against some really good talks, and we didn't get more people showing up to a talk that was very largely on the great Architecture of Participation.\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":608,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/08\/08\/is-mysql-really-taking-a-step-away-from-the-open-source-model","url_meta":{"origin":481,"position":2},"title":"On MySQL&#8217;s Commitment to Open Source","date":"8\/8\/2007","format":false,"excerpt":"Mike Kruckenberg, well-respected community member recently blogged about MySQL taking another step (away from open source, and I'd like to refute some of his worries. In fact, this is really more to drive away from what some within the community think is not kosher, i.e. change #5 in Kaj's blog\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":641,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/10\/11\/building-mysql-from-source","url_meta":{"origin":481,"position":3},"title":"Building MySQL from source","date":"11\/10\/2007","format":false,"excerpt":"So others know how I check out a fresh tree, here are instructions to building MySQL from mysql.bkbits.net, using the free bkf tool. in ~\/code, do bkf clone bk:\/\/mysql.bkbits.net\/mysql-5.0-community mysql-5.0-community to clone to community tree down to your disk wait patiently, while bitkeeper attempts to suck some of your bandwidth\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":787,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2008\/04\/15\/winners-for-2008-at-the-mysql-conference","url_meta":{"origin":481,"position":4},"title":"Winners for 2008 at the MySQL Conference","date":"15\/4\/2008","format":false,"excerpt":"2008 MySQL Application of the YearSocial Network - MySQL powered with over 70 million active users (Facebook)Mobile operator - Highly available LAMP platform at the heart of SMS, mobile and CRM applications (Virgin Mobile France)eCommerce site - Built caching tier using MySQL for 4 billion transactions per day (eBay)2008 MySQL\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1817,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2010\/07\/02\/jono-bacon-speaks-to-oracle-on-the-mysql-community","url_meta":{"origin":481,"position":5},"title":"Jono Bacon speaks to Oracle on the MySQL Community","date":"2\/7\/2010","format":false,"excerpt":"Jono Bacon recently spoke with Luke Kowalski, Oracle VP in the Corporate Architecture Group, about community in the context of MySQL. I've known Jono for sometime now, and I first met Luke at the MySQL Conference & Expo 2010 - I found out that we have a common shared interest:\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"amp_enabled":true,"_links":{"self":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/481"}],"collection":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":0,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}