Slackbot
12/01/2022, 2:23 PMOlof Salberger
12/01/2022, 2:26 PMOlof Salberger
12/01/2022, 2:33 PMRenato Santos
12/01/2022, 3:34 PMRenato Santos
12/01/2022, 3:34 PMGian Merlino
12/01/2022, 4:53 PMGian Merlino
12/01/2022, 4:54 PMGian Merlino
12/01/2022, 5:00 PM__time), and the end as secondary (let's call it end_time).
filters on the primary timestamp are super fast (there is a special index for this) so you can leverage this if you have a sense of what the max duration is. something like this for a point filter on `target_time`:
WHERE [target time] >= __time AND [target_time] < end_time AND [target_time - max_duration] <= __time
the [target_time - max_duration] <= __time clause enables more aggressive use of the primary timestamp index