Skip to content

Nested parentheses slow down SQL query execution #2528

@Phasheng

Description

@Phasheng

Summary

I may have found a performance bug in ArcadeDB. Increasing layers of nested parentheses around a constant boolean expression causes a significant increase in query execution time.

Version

25.8.1

How to repeat

Execute the following queries:

SELECT (1 > 0) AS ref0 FROM t0;
SELECT (((1 > 0))) AS ref0 FROM t0;
SELECT (((((1 > 0))))) AS ref0 FROM t0;
SELECT (((((((1 > 0))))))) AS ref0 FROM t0;

The execution time of each query increase drastically as layers of nested parentheses increase.

Expected Behavior

Expression execution time should be roughly constant regardless of the number of parentheses.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions