-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
PerformancePerformance improvementsPerformance improvementsSQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution
Description
Is your feature request related to a problem?
Example query:
-- 2.9s
SELECT ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3, COUNT(*) AS c FROM hits GROUP BY ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3 ORDER BY c DESC LIMIT 10;Here ClientIP is INT. This query can be rewritten in the following form:
-- 2.1s
SELECT ClientIP, ClientIP - 1, ClientIP - 2, ClientIP - 3, COUNT
FROM (SELECT ClientIP, COUNT(*) AS c FROM hits GROUP BY ClientIP ORDER BY c DESC LIMIT 10);Apart from subtraction, we could support adding, multiplication and division.
Describe the solution you'd like.
No response
Describe alternatives you've considered.
No response
Full Name:
Andrei Pechkurov
Affiliation:
QuestDB
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PerformancePerformance improvementsPerformance improvementsSQLIssues or changes relating to SQL executionIssues or changes relating to SQL execution