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: Person property filters on joins should be moved to subquery #22427

Closed
timgl opened this issue May 22, 2024 · 1 comment
Closed

perf: Person property filters on joins should be moved to subquery #22427

timgl opened this issue May 22, 2024 · 1 comment
Labels
performance Has to do with performance. For PRs, runs the clickhouse query performance suite

Comments

@timgl
Copy link
Collaborator

timgl commented May 22, 2024

The problem

To filter a list of events down based on person properties, we join on the person table. However, this means that when we fan out the queries to other nodes, instead of them just responding with a count, they have to send over every single event, which we then join on the main node. This means transferring 10s of GBs of data.

We should move join into a subquery instead, so the nodes can respond with the total count instead.

See this query for an overview

Example query before moving person to subquery

Example query after moving person to subquery

@timgl timgl added the performance Has to do with performance. For PRs, runs the clickhouse query performance suite label May 22, 2024
@pauldambra
Copy link
Member

100% #22358 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Has to do with performance. For PRs, runs the clickhouse query performance suite
Projects
None yet
Development

No branches or pull requests

2 participants