Because it can literally take over an hour or more to run- especially if you have a lot of notes and notebooks- it probably wouldn't be a good idea to do it automatically during upgrades. I really think this should be a selection under the Tools tab.
This is for Windows only, but it completely resolved the slow response problem for me. Switching notebooks takes about one second, compared to the 10-20 seconds it did before I ran the utility. Be certain to read the entire post first, and don't select anything other than "Optimize Database." http://www.groovypost.com/howto/howto/optimize-speed-up-evernote-performance-debug-menu/ The article is almost three years old, but still appears to be valid.