Dealing with time type data in Clickhouse

Skip to first unread message

Dmitrij Kultasev

Mar 30, 2021, 4:04:01 AMMar 30
to ClickHouse
TIME data type is not supported in Clickhouse. What are the best practices to deal with such data? Currently we are using following formula:

HOUR(timestamp)*100+MINUTE(timestamp) BETWEEN 930 and 1000

to get the data filtered by time part. That adds calculation overhead so probably it is better to store the time part in it's own column. What to store there? Should we store in such way or for example number of milliseconds/seconds/minutes starting from midnight?

Denis Zhuravlev

Mar 30, 2021, 10:25:00 PMMar 30
to ClickHouse
You can store number of seconds - Int32.
Or as a number 093201, 235959
Reply all
Reply to author
0 new messages