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

Improve query performance for ClickHouse plugin #147

Conversation

ricoberger
Copy link
Member

Instead of running the counts and buckets query before getting the logs
from ClickHouse we are now just running the buckets query. The count
query was removed, because we can also determine the count by building
the sum of the count in each bucket. This should improve the query
performance for some queries by up to 50%.

In #133 we introduced an setting, where we limit the amount of
documents, which are returned by the API. There we set a limit of 10000
documents. This setting can now be set by the user via the additional
options. If the user doesn't provide this option we set a default limit
of 1000.

Instead of running the counts and buckets query before getting the logs
from ClickHouse we are now just running the buckets query. The count
query was removed, because we can also determine the count by building
the sum of the count in each bucket. This should improve the query
performance for some queries by up to 50%.

In #133 we introduced an setting, where we limit the amount of
documents, which are returned by the API. There we set a limit of 10000
documents. This setting can now be set by the user via the additional
options. If the user doesn't provide this option we set a default limit
of 1000.
@ricoberger ricoberger merged commit 80d36d5 into main Sep 14, 2021
@ricoberger ricoberger deleted the improve-query-performance-for-clickhouse-logs-custom-max-documents branch September 14, 2021 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