We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


How is the first fixed-time interval determined when using slice_time? — Vertica Forum

How is the first fixed-time interval determined when using slice_time?

I noticed when I select a time interval of 50 minutes, it starts the period at 2:30 rather than the expected time (3:00.) This reduces the size of the first bucket to a 20 minute period because the start time is at 3:00. Here’s an example of the query and the output. SELECT count(value) as count ,time_slice(time_stamp,3000) as time_interval FROM Metrics.Metrics WHERE metric_definition_id = 27060341 AND time_stamp >= 'Wed, 18 Dec 2013 03:00:00 GMT' group by time_slice(time_stamp,3000) order by time_interval; count | time_interval --------+------------------+-------+-------+-------+--------------------- 20 | 2013-12-18 02:30:00 50 | 2013-12-18 03:20:00 50 | 2013-12-18 04:10:00 50 | 2013-12-18 05:00:00 However, this other query works fine. SELECT count(value) as count ,time_slice(time_stamp,3600) as time_interval FROM Metrics.Metrics WHERE metric_definition_id = 27060341 AND time_stamp >= 'Wed, 18 Dec 2013 03:00:00 GMT' group by time_slice(time_stamp,3600) order by time_interval; count | time_interval ---------+------------------+-------+-------+-------+--------------------- 60 | 2013-12-18 03:00:00 60 | 2013-12-18 04:00:00 60 | 2013-12-18 05:00:00 60 | 2013-12-18 06:00:00

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file