Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBeaver Freezes and Has High CPU Usage with Large Scripts #29996

Closed
CalDude10 opened this issue May 8, 2024 · 3 comments · Fixed by #30201
Closed

DBeaver Freezes and Has High CPU Usage with Large Scripts #29996

CalDude10 opened this issue May 8, 2024 · 3 comments · Fixed by #30201
Assignees
Labels
bug sp:3 xf:sql editor SQL Editor and Editor Services like autocompletion, highlighting, folding, formatting, etc. xp:major
Milestone

Comments

@CalDude10
Copy link

Description

DBeaver 24.0.3 and 24.0.4 freeze when performing certain actions on large script files (5,000 lines for example). This behavior began with 24.0.3 and I have verified that 24.0.2 behaves normally with the same large files. At first, I thought the app had completely hung, but I eventually realized that it will return to normal if I let it sit for 5 - 15 minutes depending on the script and system specs. During this time, the app is constantly using 10% - 25% CPU depending on system specs. I tried a clean install of 24.0.4 on a system that never had DBeaver and I get the same bug. If I then uninstall it and install 24.0.2, everything is fine. Some of the actions that cause the freeze are:

  1. Open or save the file
  2. Change the active datasource
  3. Change the active catalog/schema

As mentioned above, the app eventually returns to normal after a considerable wait. When executing the script, everything runs normally. In previous versions of DBeaver I have worked with scripts up to 50,000 lines with no issues, but now it trips up on even a few thousand. Below is an example of the types of statements in these scripts. So far I have had the problem with INSERT or UPDATE statements, but haven't tried any deletes lately.

Example script lines:
UPDATE PROCS SET IS_ACTIVE = '0' WHERE PROC_NAME = '17-20AR-29' AND REVISION_LEVEL = '';
UPDATE PROCS SET IS_ACTIVE = '0' WHERE PROC_NAME = '33K1-4-716-1' AND REVISION_LEVEL = '';
UPDATE PROCS SET IS_ACTIVE = '0' WHERE PROC_NAME = '33K2-4-46-1' AND REVISION_LEVEL = '';
UPDATE PROCS SET IS_ACTIVE = '0' WHERE PROC_NAME = '33K3-4-2925-1' AND REVISION_LEVEL = '';
UPDATE PROCS SET IS_ACTIVE = '0' WHERE PROC_NAME = '33K3-4-3410-1' AND REVISION_LEVEL = '';
UPDATE PROCS SET IS_ACTIVE = '0' WHERE PROC_NAME = '33K3-4-3554-1' AND REVISION_LEVEL = '';

DBeaver Version

24.0.3 Community

Operating System

Windows 10 Pro

Database and driver

Database: Microsoft SQL Server 2014
Driver Name: MS SQL Server / SQL Server

Steps to reproduce

No response

Additional context

No response

@E1izabeth
Copy link
Member

Could you try switching this setting to Always?
image

Does it help?

@E1izabeth E1izabeth added wait for response xf:sql editor SQL Editor and Editor Services like autocompletion, highlighting, folding, formatting, etc. and removed wait for review labels May 8, 2024
@CalDude10
Copy link
Author

Yes, setting that to Always fixed the issue. Looks like I gave Smart too much to think about!

@E1izabeth
Copy link
Member

Thank you. I think we should disable this heuristics for big scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug sp:3 xf:sql editor SQL Editor and Editor Services like autocompletion, highlighting, folding, formatting, etc. xp:major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants