News for hackers. Stuff that matters.
Re:ClickHouse raises $350M Series C by the__alchemist on Thursday May 29, 2025 @11:56AM (#44127318)
Is there an ELI5 for this company? I'm having a difficult time understanding it from their website. Is it an alternative to Postgres etc? Something that runs on top of it? And analyzes your DB automatically?
Re:ClickHouse raises $350M Series C by jameslk on Thursday May 29, 2025 @12:12PM (#44127455)
When Postgres takes a while to answer analytical questions like "what's the 75th percentile of response time for these 900 some billion requests rows, grouped by device, network, and date for the past 30 days", that's when you might want to try out ClickHouse
Re:ClickHouse raises $350M Series C by NewJazz on Thursday May 29, 2025 @12:36PM (#44127696)
I'm struggling with TimescaleDB performance right now and wondering if the grass is greener.
Re:ClickHouse raises $350M Series C by whatevermom on Thursday May 29, 2025 @03:32PM (#44129414)
Migrated from TimescaleDB to ClickHouse and it was like night and day. Naive reimplementation of the service performed wayyyy better than timescaledb. Self-hosted.
Re:ClickHouse raises $350M Series C by sukruh on Thursday May 29, 2025 @01:31PM (#44128245)
It is.
Re:ClickHouse raises $350M Series C by applied_heat on Thursday May 29, 2025 @01:30PM (#44128231)
What is the workload or query that is causing issues?
Re:ClickHouse raises $350M Series C by NewJazz on Thursday May 29, 2025 @06:09PM (#44130868)
We denormalized some data then wanted to quickly filter by it. I managed to find a decent index to get us through, but now I'm stuck with another dimension in my data that I'd rather not have. I think I'll have to create a new table, migrate data, then rename it.
Re:ClickHouse raises $350M Series C by andness on Thursday May 29, 2025 @05:19PM (#44130489)
Started migrating away from TimescaleDB some time ago too. Initially we self-hosted to test it out. It was very quickly clear that it was a lot better for our use case and we decided to go with Clickhouse Cloud to not have to worry about the ops. The pricing for the cloud offering is very good IMO. We use it for telemetry data from a fleet of IoT devices.
Re:ClickHouse raises $350M Series C by cluckindan on Thursday May 29, 2025 @12:42PM (#44127763)
Or literally any other OLAP database.

Is it a surprise that OLTP is not efficient at aggregation and analytics?

Re:ClickHouse raises $350M Series C by nasretdinov on Thursday May 29, 2025 @01:45PM (#44128384)
ClickHouse also has great compression and it's easy to install and to try since it's open-source. Also it's typically much faster than even other OLAP, often by a _lot_
Re:ClickHouse raises $350M Series C by swyx on Thursday May 29, 2025 @01:03PM (#44127978)
maybe HTAP works for most people though
Re:ClickHouse raises $350M Series C by bandoti on Thursday May 29, 2025 @12:58PM (#44127925)
Or if you have to use it because you’re self-hosting PostHog :)
Re:ClickHouse raises $350M Series C by jgalt212 on Thursday May 29, 2025 @01:04PM (#44127985)
I'm not sure storing 900B or 900MM records for analytics benefits anyone other than AWS. Why not sample?
Re:ClickHouse raises $350M Series C by sethhochberg on Thursday May 29, 2025 @01:19PM (#44128128)
A use case where we reached for Clickhouse years ago at an old job was for streaming music royalty reporting. Days of runtime on our beefy MySQL cluster, minutes of runtime in a very naively optimized Clickhouse server. And sampling wasn't an option because rightholders like the exactly correct amount of money per stream instead of some approximation of the right amount of money :)

There's nothing Clickhouse does that other OLAP DBs can't do, but the killer feature for us was just how trivially easy it was to replicate InnoDB data into Clickhouse and get great general performance out of the box. It was a very accessible option for a bunch of Rails developers who were moonlighting as DBAs in a small company.

Re:ClickHouse raises $350M Series C by jgalt212 on Thursday May 29, 2025 @03:19PM (#44129292)
Yes, payments is an N=all scenario. Analytics is not, however.
Re:ClickHouse raises $350M Series C by antisthenes on Thursday May 29, 2025 @06:15PM (#44130910)
Use-case dependent. For some analytics, you really want to see the tail ends (e.g. rare events) which sampling can sometimes omit or under-represent.
Re:ClickHouse raises $350M Series C by NunoSempere on Thursday May 29, 2025 @01:12PM (#44128066)
That seems like the kind of problem that would be easily done through monte-carlo approximation? How hard is it to get 1M random rows in a postgres database?
Re:ClickHouse raises $350M Series C by sylvinus on Thursday May 29, 2025 @01:17PM (#44128103)
ClickHouse has native support for sampling https://clickhouse.com/docs/sql-reference/statements/select/...
Re:ClickHouse raises $350M Series C by lbhdc on Thursday May 29, 2025 @12:06PM (#44127414)
Its a db company that offers an open source database and cloud managed services.

The database is OLAP where Postgres is an OLTP database. Essentially it very fast at complex queries, and is targeted at analytics workloads.

Re:ClickHouse raises $350M Series C by datavirtue on Thursday May 29, 2025 @01:27PM (#44128211)
Postgres has been used as the basis for several OLAP systems. These guys are probably using a modified Greenplum.
Re:ClickHouse raises $350M Series C by __s on Thursday May 29, 2025 @02:26PM (#44128784)
I got to see Citus at Microsoft fail to close against ClickHouse for an internal project

ClickHouse spun out of Yandex & is open source, https://github.com/ClickHouse/clickhouse

Disclosure: I started at Citus & ended up at ClickHouse

Re:ClickHouse raises $350M Series C by lbhdc on Thursday May 29, 2025 @01:53PM (#44128443)
As far as I am aware it is not a derivative of another database.

https://dbdb.io/db/clickhouse

Re:ClickHouse raises $350M Series C by doix on Thursday May 29, 2025 @12:04PM (#44127400)
I guess you could say it's an alternative to postgres. It's a different database, that's column oriented which makes different tradeoffs. I'd say DuckDB is a better comparison, if you're familiar with it.
Re:ClickHouse raises $350M Series C by pythonaut_16 on Thursday May 29, 2025 @12:37PM (#44127701)
Expanding for the original question:

Roughly speaking, Postgres is to SQLite what Clickhouse is to DuckDB.

OLTP -> Online Transaction Processing. Postgres and traditional RDBMS. Mainly focused on transactions and addressing specific rows. Queries like "show me all orders for customer X".

OLAP -> Online Analytical Processing. Clickhouse and other columnar oriented. For analytical and calculation queries, like "show me the total value of all orders in March 2024". OLTP database typically store data by column rather than row, and usually have optimizations for storage space and query speed based on that. As a tradeoff they're typically slower for OLTP type queries. Often you'd bring in an OLAP db like Clickhouse when you have a huge volume of data and your OLTP database is struggling to keep up.

Re:ClickHouse raises $350M Series C by ksynwa on Thursday May 29, 2025 @12:46PM (#44127797)
What's the significance of "online" in these acronyms?
Re:ClickHouse raises $350M Series C by edoceo on Thursday May 29, 2025 @01:08PM (#44128038)
Live and real-time
Re:ClickHouse raises $350M Series C by stonemetal12 on Thursday May 29, 2025 @01:08PM (#44128034)
It is a rather old acronym. The other option was batch processing, you will get your results in the mail type thing.

Here "Online" means results while connected to the system, not real time since there is no time requirement for results.

Re:ClickHouse raises $350M Series C by IMTDb on Thursday May 29, 2025 @06:33PM (#44131027)
Online means you expect the responses to come quickly (seconds) after launching the request. The opposite is "offline" where you expect the results to come a long time after making the request (hours / days).

ClickHouse is designed so you can build dashboard with it. Other offline system are designed so you can build reports that you send in PDF over email with them.

Re:ClickHouse raises $350M Series C by simantel on Thursday May 29, 2025 @12:20PM (#44127537)
It's an alternative to Postgres in the sense that they're both databases. Read up on OLAP vs. OLTP to see the difference.
[dead]
Re:ClickHouse raises $350M Series C by davidjfelix on Thursday May 29, 2025 @01:26PM (#44128194)
So what's the goal here? Astroturf SingleStore ads in any post about databases?
Re:ClickHouse raises $350M Series C by bbohan on Thursday May 29, 2025 @01:35PM (#44128274)
Not an ad. You reading the replies in this thread?
Re:ClickHouse raises $350M Series C by davidjfelix on Thursday May 29, 2025 @02:40PM (#44128911)
Yeah -- I see nobody but you mentioning HTAP and I see every comment on your account talking about the same product. That's astroturfing.
Re:ClickHouse raises $350M Series C by bbohan on Thursday May 29, 2025 @02:51PM (#44129010)
Talking about a product I like is astroturfing? There's mention of Postgres, BigQuery, DuckDB, the whole 9. We can only speak of the big players?
Re:ClickHouse raises $350M Series C by davidjfelix on Thursday May 29, 2025 @03:07PM (#44129161)
Is that the case? It's just a product you like?
Re:ClickHouse raises $350M Series C by whobre on Thursday May 29, 2025 @12:29PM (#44127631)
It's not like Postgres at all, except on the very superficial level. It is an analytical engine like BigQuery, Snowflake, Teradata, etc...
Re:ClickHouse raises $350M Series C by arecurrence on Thursday May 29, 2025 @12:33PM (#44127682)
Clickhouse has a wide range of really interesting technologies that are not in Postgres; fundamentally, it's not an OLTP database like Postgres but more-so aimed at OLAP workloads. I really appreciate Clickhouse's focus on performance and quite a bit of work goes into optimizing the memory allocation and operations among different data types.

The heart of Clickhouse are these table engines (they don't exist in Postgres) https://clickhouse.com/docs/engines/table-engines . The primary column (or columns) is ordered in some way and adjacent values in memory are from the same column in the table. Index entries span wide areas (EG: By default there's only one key record in the primary index for every 8192 rows) because most operations in Clickhouse are aggregate in nature. Inserts are also expected to be in bulk (They are initially a new physical part that is later merged into the main table structure). A single DELETE is an ALTER TABLE operation in the MergeTree engine. :)

This structure allows it to literally crunch billions of values per second (brutally, not with pre-processing, erm, "tricks" although there is a lot of support for that in Clickhouse as well). I've had tables with hundreds of columns and 100+ billion rows that are nearly as performant as a million row table if I can structure the query to work with the table's physical ordering.

Clickhouse recommends not using nullable fields because of the performance implications (it requires storing a bit somewhere for each value). That's how much they care about perf and how close to the raw data type it is that their memory allocation uses. :)

Re:ClickHouse raises $350M Series C by porridgeraisin on Thursday May 29, 2025 @12:57PM (#44127914)
> Inserts are also expected to be in bulk (They are initially a new physical part that is later merged into the main table structure). A single DELETE is an ALTER TABLE operation in the MergeTree engine.

> They are initially a new physical part that is later merged into the main table structure

> A single DELETE is an ALTER TABLE operation

Can you explain these two further?

Re:ClickHouse raises $350M Series C by arecurrence on Thursday May 29, 2025 @12:59PM (#44127935)
The Clickhouse docs are so good that I'd point straight to them https://clickhouse.com/docs/sql-reference/statements/alter/d... .

The reason I mentioned it is because it's a huge surprise to some people that... from the docs: "The ALTER TABLE prefix makes this syntax different from most other systems supporting SQL. It is intended to signify that unlike similar queries in OLTP databases this is a heavy operation not designed for frequent use. ALTER TABLE is considered a heavyweight operation that requires the underlying data to be merged before it is deleted."

There's also a "lightweight delete" available in many circumstances https://clickhouse.com/docs/sql-reference/statements/delete. Something really nice about the ClickHouse docs is that they devote quite a bit of text to describing the design and performance implications of using an operation. It reiterates the focus on performance that is pervasive across the product.

Edit: Per the other part of your question, why inserts create new parts and how they are merged is best described here https://clickhouse.com/docs/engines/table-engines/mergetree-...

Re:ClickHouse raises $350M Series C by porridgeraisin on Thursday May 29, 2025 @03:54PM (#44129668)
Thankyou!
Re:ClickHouse raises $350M Series C by Silasdev on Thursday May 29, 2025 @12:41PM (#44127744)
SQL, OLAP, Primary use case is fast aggregations on append only data, like usage analytics.

It's fast, it's........ really fast!!

But you need to get comfortable with their extended SQL dialect that forces you to think a little different than with usual SQL if you want to keep perf high.

Re:ClickHouse raises $350M Series C by joshstrange on Friday May 30, 2025 @08:03AM (#44135335)
If you go into it with MySQL/Postgres knowledge you will probably hate it.

Source: me

I almost wish it didn’t use SQL so that it was clear how different it is. Nothing works like you are used to, footguns galore, and I hate zookeeper.

I’d replace it with Postgres in a heartbeat if I thought I could get away with it, I don’t think our data size really needs CH. Unfortunately, my options are “spin up a Custer on company resources to prove my point” or “spin it up on my own infra” (which is not possible since that would require pulling company data to my servers which I would never do). So instead I’m stuck dealing with CH.