I’m looking to setup a very simple analytics dashboard and am curious if TimescaleDB supports continuous updating of rollup/summary data.
Given a table like the following that is continuously populated by analytic data from web browsers (similar to Google Analytics):
CREATE TABLE events (
id UUID NOT NULL,
client_id UUID NOT NULL,
session_id UUID NOT NULL,
name TEXT NOT NULL,
path TEXT NOT NULL,
user_id UUID,
created_at TIMESTAMPTZ NOT NULL
);
I want to be able to have a query like the following that loads quickly:
SELECT count(*)
FROM events
WHERE name = "site:user_signedUp"
AND campaign_id = "foobarbaz";
Note the lack of any time_bucket
in the query. I want the total across all time. I was hoping continuous aggregates would be able to accomplish this by keeping a running total but it’s unclear. Does TimescaleDB support such a use case? If not, any pointers?