First release candidate for TimescaleDB 1.0
Is TimescaleDB a good fit for events?<p>For example, we have data where each record is a tuple of (time, event, object), where the event is things like &quot;viewed&quot;, &quot;performedSearch&quot;, etc., and the object is event data as JSON. Let&#x27;s say the object is a movie, in which case the payload might be something like:<p><pre><code>   {&quot;id&quot;: 123,
   &quot;name&quot;: &quot;The Godfather&quot;,
   &quot;director_id&quot;: 456,
   &quot;genre&quot;: &quot;crime&quot;}
</code></pre>
Our reporting UI lets users do aggregations based on arbitrary dimensions, so we might do the equivalent of:<p><pre><code>    select object-&gt;&gt;&#x27;genre&#x27; as genre,
      object-&gt;&gt;&#x27;director_id&#x27; as director_id,
      extract(month from time) as month,
      count(*) as count
    from events
    group by month, genre, director_id
</code></pre>
Then we do things like pivot&#x2F;nest values to display the groupings.<p>It&#x27;s unclear to me whether TimescaleDB fits this use case, or whether we&#x27;d have to change how things are indexed. Right now we just index the whole object itself. Another scheme I&#x27;ve considered is that we could index it with the values as keys; so for example, the above event would be {&quot;name:The Godfather&quot;: 1, &quot;director_id:456&quot;: 1, &quot;genre:crime&quot;: 1} and essentially represent the counts. A counting aggregation would then be rewritten as as a sum(). But it&#x27;s unclear to me how you do intersections here without also creating all the permutations (i.e. something like {&quot;director_id:456&#x2F;genre:crime&quot;: 1}) beforehand.<p>We&#x27;re currently using Elasticsearch for this. Performance is okay, but we&#x27;re not entirely happy with it.