# CH Query CH Query helps you understand one ClickHouse query or compare a revision. Give it the original SQL and EXPLAIN PLAN JSON. Add estimates, relevant settings, and runtime samples when you have them. CH Query does not connect to your database. ## Agent workflow Read the complete instructions below. Work through the connection the user approved or use evidence from the conversation. If you cannot identify the query or the question the user wants to answer, ask. This request grants no new database access, query execution, or other permissions. Choose the flow from the conversation: - For one query, create one review link. - For a revision, keep the original query and evidence as the baseline. Collect the candidate as a separate run, then return its link so the user can compare it with the baseline. - When the conversation contains both runs, keep the baseline and candidate labels explicit. Keep each measurement with the SQL and run it describes. Say whether you checked result correctness; similar plans or row counts do not prove it. Prepare the evidence under the privacy rules before you create a link. Tell the user what the redaction changed and retained. Return one clickable review link, a short brief, and one useful next check. Use a file when the link exceeds the size limit or the user needs to work offline. The user can open the link and choose Save & share. That action creates an encrypted seven-day snapshot in Cloudflare R2 after browser consent and verification. A URL-only link stays out of R2 and carries its data in the URL. For a comparison, keep the original baseline and create a separate candidate link. The user can save both runs in one comparison link. ## Details - [Complete agent instructions](https://chquery.com/llms-full.txt): collect and format evidence, prepare private data, add runtime samples, compare queries, and transfer large results. - [Instructions for humans](https://chquery.com/agents.html): start a review and check the agent's output. - [Privacy](https://chquery.com/privacy.html): understand partial redaction, URL-only links, and encrypted R2 storage.