optimizing-clickhouse-and-hogql-queries
optimizing-clickhouse-and-hogql-queries is a Databases & SQL skill for AI agents, published by PostHog in the posthog repository on GitHub. Skillspace rates optimizing-clickhouse-and-hogql-queries F (45/100) and the safety scan rated it risky; the rating is based on static analysis only.
Risky. This skill has patterns associated with unsafe behaviour. Read the source carefully before running it.
Workflow for optimizing ClickHouse and HogQL queries. Use when a HogQL query, query runner, insight, or report is too slow; when a hand-written ClickHouse query (via `sync_execute` or in a migration) is too slow; when ClickHouse times out or hits memory limits; when investigating a slow `system.query_log` row; or when reviewing a proposed HogQL printer change for performance. Covers extracting the ClickHouse SQL, common smells (`FROM ... FINAL`, `JSONExtract` over properties, missing skip indexes, self-joins, CTE blow-up), measuring against a real cluster, and applying the fix at the right layer (printer, query runner, or migration). Does NOT cover Postgres / Django ORM / app-database queries; those need pganalyze and the Postgres section of `query-performance-optimization.md`.
- Grade
- F
- Quality
- 45 / 100
- Safety
- Risky
- GitHub stars
- 35,560
Unproven: rated by static analysis only, not yet compared head-to-head.
This rating describes the version of the repository we crawled; it may have changed since.
Our review
- Architecture
- 94 / 100
- Maturity
- Structured: ships references or scripts
- Security scan
- High-risk patterns
- License
- Not declared. Check the repository before reusing it.
- Adoption
- Adopted by 1 other repositories, in 1 collections
What the scanner flagged
- references sensitive credential env
Not checked yet
- Category is a classifier prediction; no model has read this skill yet
- Not judged on the rubric yet (not a contender in its category)
- No blind task eval yet
- Scope (portable / vendor / repo-internal) not assessed; only the top of each category is read for scope
- Sibling files (scripts, references) not fetched; security scan covers SKILL.md only
Skillspace indexes and rates this skill; it does not host or endorse it. Run third-party skills at your own risk.