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:

image

There’s a single hotspot:

image

Here’s a VisualVM snapshot with more details:

snapshot-1625731372916.zip

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (3 by maintainers)

Commits related to this issue

Most upvoted comments

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.