Oracle SQL Developer 3.2.09 is consuming lot of memory on windows 7

oracle-sql-developer

Oracle SQL Developer Version 3.2.09 is consuming lot of memory on windows 7.

I can see, after 1/2 days of usage and without closing the this application, the memory consumption is going upto 700 MB.

So, in this case, I need to close the application and again restart.

Any remedies for this can be helpful.

Details of SQL Developer are:

Oracle SQL Developer  Version 3.2.09

Build MAIN-09.30

JDK we are using is JDK 1.6

Best Answer

Add below lines to C:\Users\<<user>>\AppData\Roaming\sqldeveloper\4.2.0\product.conf

For 64 bit SQL Developer add:

Add64VMOption -XX:+UseG1GC
Add64VMOption -XX:MinHeapFreeRatio=15
Add64VMOption -XX:MaxHeapFreeRatio=30

For 32 bit SQL Developer add:

Add32VMOption -XX:+UseG1GC
Add32VMOption -XX:MinHeapFreeRatio=15
Add32VMOption -XX:MaxHeapFreeRatio=30

Restart SQL Developer.

To reduce the memory close only the results pane that has huge result set.

TIP: I typically increase JVM memory to 2 GB so SQL Developer does not crash for queries with large result sets. This can be done by adding below line to product.conf:

Add64VMOption -Xmx2048m