Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

optimizing-clickhouse-and-hogql-queries

Diagnose a slow HogQL or ClickHouse query and rewrite it to run faster.

When to use it

You have a slow insight, query runner, or hand-written ClickHouse query and need to find why it's slow and fix it.

For example

You say

My HogQL insight over events is timing out. Here's the query — help me optimize it.

You get
  • Printed ClickHouse SQL
  • Rewritten HogQL query
  • Explanation of the fix

How it works

  • Works from the generated ClickHouse SQL rather than the HogQL, then translates fixes back.
  • Flags common smells like FROM ... FINAL, JSONExtract on properties, and self-joins.