mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
09fe2859ae
* Fix and test more sessions pagination cases Pagination previously did not work correctly on CH/postgres due to LIMIT clauses Simplifying the sessions query helps on clickhouse, though might introduce new issues. * Make sessions list pagination work The key idea is divorce distinct_id lookups from result lookups. This now works in the scenario where 101 users match person filter/have done an event in time range, but only the 101st has a session matching action/event filter (see tests) This will perform even on superdaily, though it might slow down for very specialized queries. Potential future speedups: - apply action/event filters on the distinct_id query - only return those which who have the possibility of matching. - Make distinct_id LIMIT higher if we know action/event limit is involved - Caching the distinct_id query heavily * Reorganize code * Make session list tests pass w/ pagination * Add tests, fix another corner case for postgres sessions list distinct_ids were not always returned in the right order. * Include distinct_id in sessions query This should now solve https://github.com/PostHog/posthog/issues/3055 |
||
---|---|---|
.. | ||
__init__.py | ||
average.py | ||
clickhouse_sessions.py | ||
distribution.py | ||
list.py |