Timestamp index
Use a timestamp index to speed up your time query with different granularities
Was this helpful?
Was this helpful?
select count(*),
datetrunc('WEEK', ts) as tsWeek
from airlineStats
WHERE tsWeek > fromDateTime('2014-01-16', 'yyyy-MM-dd')
group by tsWeek
limit 10select dateTrunc('YEAR', event_time) as y,
dateTrunc('MONTH', event_time) as m,
sum(pull_request_commits)
from githubEvents
group by y, m
limit 1000
Option(timeoutMs=3000000){
"fieldConfigList": [
{
"name": "ts",
"timestampConfig": {
"granularities": [
"DAY",
"WEEK",
"MONTH"
]
}
}
...
]
...
}