Increase heap size for sqlworkbench/J

17,010

Solution 1

I could not find the info.plist file any where in the application folder on my Macbook pro. When I searched for Info.plist, I could find only the Microsoft Office related one.

I right clicked the sql workbench J icon on the desktop, and selected Show package contents. I could finally find the Info.plist file there!! I changed the heap size there from 512mb to 4096 mb.

<string>-Xmx4096m</string>

Solution 2

After doing a lot of re-search and investigation, I found the solution of this problem in Windows.

To increase heap size for sqlworkbench/J, you have to open your "sqlworkbench.jar" file with the help of PowerShell or CMD.

Steps are mentioned below:

1.) Navigate to the directory containing all files and folder related to this software.I have placed my files in this location. "C:\Users\raushkum\Documents\downloads\Workbench-Build124"

2.) Hold shift and right click anywhere in white space area. A popup will appear with option available "open PowerShell window here". You do either way also- open PowerShell and navigate to the directory containing all files and folder for Sqlworkbench/J software.

3.) After successful navigation to directory just execute following command in PowerShell.

Command: java -Xmx4g -jar sqlworkbench.jar

# Here 4g is the memory i am going to assign to workbench/J. You can change it to 5g,6g,7g etc. as per you requirement.

You can verify your allocated memory size at that time using this way.

1.) Open sqlworkbench/J > click on help > About

You can see in this picture

Drawback: Every time, you have to open like this then only desired memory will be assigned to software. As soon as you close this it'll roll back to default allocation of memory.

Bonus info: You can find all settings,cache,log etc. info in this location:

1.) C:\Users\"user name"\.sqlworkbench

If did not get, try this:

1.) Open sqlworkbench/J > click on help > About

2.) You can see the setting file and log file location.

Solution 3

This isn't the case any longer on MacOS. SQL Workbench has a proper Application Stub. The proper way to change the memory setting is: 1.) in Finder, open the "Applications" folder 2.) Right Click on the "SQL Workbench" icon and select "Show Package Contents" 3.) Open document.wflow with TextEdit (this may be right click, "Open With..." "Other...", select TextEdit. 4.) CMD-F Xmx 5.) Replace the value there with the desired one. (e.g. 4g or 8g)

Share:
17,010
Neil
Author by

Neil

Updated on June 04, 2022

Comments

  • Neil
    Neil almost 2 years

    How do we increase heap size for SqlWorkbench/J?

    I have tried different options but most of it says to execute below command :-

    java -Xmx4g -jar sqlworkbench.jar
    

    Even on http://www.sql-workbench.net/manual/install.html#install-increase-memory , it provides me this solution.

    Now, I am using macbook. So I have sqlworkbench.app file only. I neither have any .ini file or .jar file for sqlworkbench.

    So, how do increase memory size?