Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(insights): use cached data to help refresh trends query #22993

Closed
wants to merge 23 commits into from

Conversation

aspicer
Copy link
Contributor

@aspicer aspicer commented Jun 15, 2024

This PR makes no user facing changing.

It adds the ability to refresh a cached trends query by using mostly cached data and only pulling data intervals that have occurred since the last fresh of the trend.

For now, it just runs both queries side by side and then compares the results to see how often it is failing.

Concerns running this on production are / potential issues are:

  • It kicks off twice as many clickhouse queries for each trends query, although the extra ones look at a much smaller date range. While in testing, it might make sense to delay calculating the cached version of the query until the real one returns the data.
  • If new events are streaming in live, the data between the two queries might not be 100% the same. Need to account for this.

@aspicer aspicer changed the title wip feat(insights): use cached data to help generate response Jun 18, 2024
@aspicer aspicer changed the title feat(insights): use cached data to help generate response feat(insights): use cached data to help refresh trends query Jun 18, 2024
@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@posthog-bot posthog-bot closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants