analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Perf: Improve performance of top stats query with long time windows

Open macobo opened this issue 1 year ago • 0 comments

We usually don't read events/pageviews from sessions table as sessions can start before or after the time window of the query. This is particularly pronounced with realtime queries.

After this change we start reading events/pageviews from sessions table for longer time periods as the inaccuracies introduced by the session timing is minimized this way.

The end result is that queries for e.g. top stats on dashboard load for 7 days or longer periods only requires reading sessions table.

macobo avatar Nov 26 '24 10:11 macobo