Parser is slow when parsing H2 query
See original GitHub issueSystem 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:
Issue Analytics
- State:
- Created 2 years ago
- Comments:24 (3 by maintainers)
Top Results From Across the Web
Performance - H2 Database Engine
For most operations, the performance of H2 is about the same as for HSQLDB. One situation where H2 is slow is large result...
Read more >Improving Read/Write performance for 30 million records per ...
If query performance still seems slow, try running ANALYZE to update index statistics. *** Why I think the CSV reader may be slow:...
Read more >Why can't H2 database parse a timestamp? - Stack Overflow
I can fix the error by setting up the string like TO_DATE('30-AUG-2018'), but changing the query kind of defeats the purpose since I...
Read more >very weird slow query parse time, for very simple query
Hello, I'm running a very simple query on an Oracle 10.2.0.1.0 Express database from an imported schema: select * from table where pk_col ......
Read more >Bug #4932: Error in reports after upgrade from H2 1.4.197 to ...
Parser.parse(Parser.java:843) [java] at org.h2.command. ... Issue #1097: H2 10x slower than HSQLDB and 6x than Apache Derby for specific query with GROUP BY ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.
verified