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

[CH][HUD] Set query_id parameter for ClickHouse queries #6091

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clee2000
Copy link
Contributor

@clee2000 clee2000 commented Dec 18, 2024

Set the query_id to be query_name-uuid for named queries or adhoc-uuid in the case of adhoc queries.

This is helpful for getting average time and memory usage for queries and mapping them back to the original query. The system.query_log table can be used to find this information (https://clickhouse.com/docs/knowledgebase/find-expensive-queries) but when using the ClickHouse javascript package, the query column there is a parsed version of the query which is hard to map back to the original query text.

The query_id needs to be unique for every query and the docs suggest using a uuid
https://clickhouse.com/docs/en/integrations/javascript#query-id

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
torchci ✅ Ready (Inspect) Visit Preview Dec 18, 2024 9:49pm

@clee2000 clee2000 marked this pull request as ready for review December 18, 2024 21:49
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 18, 2024
@clee2000 clee2000 requested a review from a team December 18, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants