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

ClickHouse ® tips #6: Filtering data in subqueries to avoid joins

Blog post from Tinybird

Post Details
Company
Date Published
Author
Xoel Lopez
Word Count
175
Language
English
Hacker News Points
-
Summary

In ClickHouse, joining two tables and filtering by a column from the right-side table can be approached differently than in databases like Postgres, leading to significant performance improvements. Instead of performing a join when the result will always be filtered post-join, ClickHouse's columnar storage allows for direct filtering, which is highly efficient. By rewriting the query to utilize this feature, one can achieve faster results without creating a join table. Tinybird leverages ClickHouse to enable the creation of real-time API endpoints quickly, simplifying complex data operations, although it is currently in private beta and requires account creation for testing.