Improving SQL Developer Performance and Eliminating Screen Redraw Issues on Vista
This isn’t anything Federal-specific, but I just wanted to share it since it has definitely made my day. I’ve been dealing with some SQL Developer performance issues for a while and due to heavy use lately in looking at a lot of conversion data and program code, the issues been getting more and more annoying. If you’re not familiar with the tool, SQL Developer is Oracle’s free DB query tool similar to TOAD, SQL Navigator, PL/SQL Developer, etc. Click here to goto Oracle’s SQL Dev page for more info and to download. I’ve been using SQL Dev since it first came out and have been pretty happy with it, especially since its free. However when I upgraded to Vista a while back, I started noticing that the SQL editor window would frequently garble the code when scrolling quickly such as:
In addition, I’ve just been getting frustrated at some performance issues, especially around switching back to my SQL Dev windows when multi-tasking with other apps. This week, I’ve been starting to scope out a new laptop, thinking that its just time to upgrade and that would solve the issues. Well before I hit the buy button, I tried to do some searching a bit online and have found the solutions to my issues, without having to break out the credit card.
Thanks to these two blog posts, SQLDeveloper + Vista Trick and SQLDeveloper setup trick, I followed the solutions documented and things are working much better. The fixes just involve making a few tweaks to the config files that SQL Dev uses.
1) Download the latest java jdk (http://java.sun.com/javase/downloads/index.jsp) (Honestly, I didn’t do this since I just wanted to see if the fixes would work quickly and since I have 1.6.0_05 installed, I figured that might be good enough)
2) Edit the C:\…..\sqldeveloper\ide\bin\ide.conf file (where C:\….. is wherever you have SQL Dev installed) & add the following lines:
# setting maximum heap to 256 MB
AddVMOption -Xmx256M
#setting keepWorkingSetOnMinimize
AddVMOption -Dsun.awt.keepWorkingSetOnMinimize=true
Note: My ide.conf file already had the maximum heap set (AddVMOption -Xmx512M), so I just left that is and just added the keepWorkingSetOnMinimize. The keepWorkingSetOnMinimize apparently prevents Vista from using the memory that SQLDev has been consuming when its minimized.
Edit the C:\…..\sqldeveloper\ide\bin\jdk.conf file (where C:\….. is wherever you have SQL Dev installed) & add the following line to direct SQL Dev to use the latest JDK on your machine:
SetJavaHome C:\Program Files\Java\jdk1.6.0_05
Replace the directory with whatever directory you have the latest JDK installed in.
Then I also changed the Look and Feel from Oracle to Windows (Tools > Preferences > Environment). Although it might not be as pretty, it seemed to speed things up further, which is definitely more important in my book.
That’s it and things are working much better. My post is pretty short, so be sure to check out the other links if you want to implement this fix as they have additional info.
The part of setting the look and feel to Windows has ruined my SQLDev into not displaying its UI anymore after restarting. This is a common issue and a fix can be found on Google. Google for ‘sqldeveloper doesn’t show up look and feel’.
aaa
22-Feb-11
Thanks to aaa for that tip; changing look ‘n’ feel to windows also messed up my SqlDeveloper.
Alanzo
23-Mar-12
Very helpful article. Many thanks for publishing this information. You saved my valuable time which would get lost by waiting for SQL Developer to respond.
Anonymous
7-May-13