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

perf: Speed up create_hogql_database #27446

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

timgl
Copy link
Collaborator

@timgl timgl commented Jan 10, 2025

Problem

create_hogql_database is slow. We execute it twice for every query and for our team it takes ~700ms for every call.

Changes

  • Move around Team objects instead of team_id to avoid hitting the database for teams object again and again

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

@timgl timgl force-pushed the speed-up-create-database-hogql branch 2 times, most recently from 47a3df0 to d58637a Compare January 10, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant