dbeaver: Parser is slow when parsing H2 query
System information:
- Operating system (distribution) and version: Microsoft Windows [Version 10.0.19042.1052]
- DBeaver version: Version 21.1.1.202106210824
Connection specification:
- Database name and version: H2 1.4.200
- Driver name: org.h2.Driver
Describe the problem you’re observing:
The UI freezes for a short time when running a query.
Steps to reproduce, if exist:
Run this query:
select
cast((
select coalesce(
json_arrayagg(json_array("v0") order by "t"."v0"),
json_array(null on null)
)
from (
select 2 "v0"
union
select 4 "ID"
) "t"
) as text);
A profiling session shows that a lot of time is spent in DBeaver’s parser:

There’s a single hotspot:

Here’s a VisualVM snapshot with more details:
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (3 by maintainers)
Commits related to this issue
- #13141 JSQLParser upgrade to 4.2 — committed to dbeaver/dbeaver by serge-rider 3 years ago
Hi Lukas. This looks like a performance issue in the @JSQLParser library. I’ll create a ticket on their issue tracker. Thanks for the report.