DBeaver is a powerful database management tool, but it can sometimes be slow or less user-friendly if not properly configured. Here are some tips and adjustments you can make to improve its performance and usability.
1. Tuning the dbeaver.ini
File
Adjusting the dbeaver.ini
file can significantly improve DBeaver’s performance by optimizing memory settings and removing unnecessary options.
Recommended dbeaver.ini
Configuration:
-Xms1024m
-Xmx4096m
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.cocoa.useNativeItemHeight=false
-Ddbeaver.distribution.type=dmg
-XX:+UseG1GC
-XX:+UseStringDeduplication
Changes Explained:
- Initial Heap Size (
-Xms
): Increased from 64m to 512m to handle larger datasets. - Maximum Heap Size (
-Xmx
): Increased from 1024m to 2048m for better performance. - Garbage Collection: Added
-XX:+UseG1GC
for improved garbage collection. - String Deduplication: Added
-XX:+UseStringDeduplication
to reduce memory usage.
These adjustments help DBeaver handle larger datasets and run more efficiently.
2. Setting the Default Timezone
To set the default timezone in DBeaver:
- Open DBeaver and go to Preferences (
DBeaver > Preferences
orCmd + ,
on macOS). - Navigate to User Interface > Regional Settings.
- Set the Timezone to your desired timezone (e.g.,
Asia/Kolkata (UTC+05:30)
). - Click Apply and Close to save the changes.
- Restart DBeaver for the changes to take effect.
3. Improving Readability of the Interface
Adjusting the appearance settings can make DBeaver more readable:
- Open Preferences (
DBeaver > Preferences
orCmd + ,
on macOS). - Go to User Interface > Appearance.
- Make sure Enable theming is checked.
- Choose a theme that suits your preference (e.g., Dark, Light).
- Adjust the Font and Color settings as needed.
- Ensure Always show full titles is checked and Hide icons is unchecked.
4. Enabling Autosave
To avoid losing work and the annoyance of save prompts:
- Open Preferences (
DBeaver > Preferences
orCmd + ,
on macOS). - Navigate to Editors > Autosave.
- Check Enable autosave for dirty editors.
- Set the autosave interval to a reasonable value (e.g., 20 seconds).
- Apply the changes and close the Preferences window.
5. Enhancing Grid Readability
To make the data grid more readable:
- Open Preferences (
DBeaver > Preferences
orCmd + ,
on macOS). - Go to Editors > Data Editor > Appearance > Grid.
- Adjust the following settings:
- Mark odd/even rows
- Colorize data types
- Show column type icons
- Show attribute filters
- Show attribute ordering
- Show cell in focus
- Highlight rows with selected cells
- Apply the changes and close the Preferences window.
Configuring pgFormatter
To format SQL queries using pgFormatter:
- Install pgFormatter:
brew install pgformatter
- Open Preferences (
DBeaver > Preferences
orCmd + ,
on macOS). - Navigate to Editors > SQL Editor > Formatting.
- Set Formatter to External formatter.
- In the Command line field, enter:
/opt/homebrew/bin/pg_format
- Check Use temp file and set the Exec timeout to 2000 milliseconds.
- Optionally, check Use bold font for keywords.
- Apply the changes and close the Preferences window.
By following these steps, you can significantly enhance DBeaver’s performance and make it more developer-friendly. Adjust the settings further based on your specific needs and preferences. Happy coding!
Reference: