Home / Companies / PostHog / Blog / Post Details
Content Deep Dive

The secrets of PostHog query performance

Blog post from PostHog

Post Details
Company
Date Published
Author
Karl-Aksel Puulmann
Word Count
1,349
Company Posts That Month
10
Language
-
Hacker News Points
-
Post removed?
No
Summary

PostHog aims to enhance its product analytics platform by implementing significant performance improvements to ensure efficient data querying, particularly for large-scale users. Recent upgrades have focused on speeding up property filtering by materializing frequently accessed properties into new columns, resulting in a 25x improvement in query performance. Additionally, PostHog has optimized JOIN operations for large user bases by altering its schema to reduce memory usage and increase speed by up to 10x. To further enhance performance, the company has reorganized data sorting strategies using ClickHouse's MergeTree table engine, achieving a 23% speed increase in query execution by updating the ORDER BY clause to incorporate event types. PostHog has also introduced an asynchronous migration system to manage extensive data restructuring processes efficiently. Looking ahead, the platform plans to eliminate JOINs for person and group data, implement smart caching for time-series queries, and leverage better JSON support in ClickHouse to maintain high performance at any scale.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Data Pipeline 1 227 80 38 +13%
Secrets Management 1 761 80 45 +62%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.