Observe Performance Cookbook: Use Interval for Ephemeral Things


Using a dataset with ephemeral resources is taking a long time or using a lot of query credits.


Copy the resource dataset and modify it to be an Interval dataset instead by replacing make_resource with make_interval.


In general, Resources should be used to model “things that last a long time and may change state”, like Host, Container, or Customer. Intervals should be used to model “things that last a short period of time and do not change state”, like User Sessions, Financial Transactions, or API Calls.

For example, you may want to model a customer request dataset where each customer request is made of a few events and only lasts for a few minutes. These requests can be modeled using the make_interval verb, which produces an interval dataset.

make interval options(expiry:10s), valid_from, valid_to

Note that older datasets may have used make_session to produce Interval datasets instead: