optimizing-clickhouse-and-hogql-queries
Claude Code skill by @PostHog
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; for those use `profiling-slow-api-endpoints`.
- Price: Free
- Signal index: 0/100
- Source: posthog/posthog
- Updated:
Related topics
- Code migration skills
- Performance skills
- Agent memory skills
- SQL skills
- PostgreSQL skills
- Django skills
- Data visualization skills
- Refactoring skills
- JavaScript skills
- Image generation skills
- Prompt engineering skills
- Go-to-market skills
- iOS and Swift skills
- Java skills
- MongoDB skills
- UI design skills
- Ruby on Rails skills
- React skills
- Flutter skills
- Debugging skills
- Browser extensions skills
- Claude Code workflow skills
- Finance skills
- Database design skills
- Authentication skills
- Music skills
- CSS skills
- Python skills
- Redis skills
- Google Cloud skills
Create a free account to install this skill or run it from Claude Code or Codex.