I have a table with a time field. I have used time_to_sec function to convert the time to seconds from midnight. I need this to create 5 min buckets for data…
select
sec_to_time((floor(time_to_sec(time)/300)+1)*300) as time_bucket,
count(*)
from
trades
where
date=“20090908”
group by time_bucket
order by time_bucket
1) I dont see time_to_sec & sec_to_time in the list of optimized functions for Infobright. So does that mean my query is running slow (it takes 70 seconds for about 25M records)
2) is there a better way I can write the above query?
thanks for your help in advance.
Nishant

