Skip to content

Performance degradation when aliasing columns #2566

@jerrinot

Description

@jerrinot

Describe the bug

This query executes on the demo box in around 100ms:

select symbol, count() 
from trades 
group by symbol;

but this query executes 10s (100x more!)

select symbol as s, count() 
from trades 
group by s;

Both queries are functionally equivalent and should result in the same query plan. Apparently, that's not the case.
I reckon aliasing disables an optimization.

Environment

https://demo.questdb.io/

  • QuestDB version: 6.5.3

Metadata

Metadata

Assignees

Labels

BugIncorrect or unexpected behaviorPerformancePerformance improvementsSQLIssues or changes relating to SQL execution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions