MySQL, with SHOW PROFILE and updated INFORMATION_SCHEMA, built from the Community tree
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 7m51.127s user 3m13.836s sys 2m19.803s
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 testcases
Maybe we could have a competition to see how fast MySQL builds (under 8 minutes) and tests (under 19 minutes), something similar to the 7-second Linux kernel compile. 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.
Why is MySQL Community Server 5.0.37 significant? Because it contains Jeremy Cole’s SHOW PROFILE feature. Notice how thats not just a patch any longer, its a feature, from the community, that’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).
Profiling isn’t enabled by default (check via: show variables like 'profiling';), so you’d do well to set profiling='on';. Once that is done, you can just execute SHOW PROFILE; to be greeted by the feature. Using the INFORMATION_SCHEMA database, and something like: select duration,source_function,source_file from profiling; 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 – best of all, I can see which source file I might want to edit if need be.
I’m told this does not work on Windows, or Solaris (?), because they don’t have the getrusage() syscall, but it should probably work just fine on OS X based MySQL servers.