ClickHouse / pastila

Paste toy-service on top of ClickHouse
https://pastila.nl/
Apache License 2.0
68 stars 6 forks source link

Calculate hashes on server? #1

Closed stas-sl closed 2 years ago

stas-sl commented 2 years ago

As I understand, currently ClickHouse can’t return populated columns on insert. But if it could, it would be possible to simplify client side, improve performance for large text blobs and eliminate hash mismatches, if for some reason client and server calculated them differently.

Or there is some other reason to calculate them on client, that I’m missing?

stas-sl commented 2 years ago

Reread the post one more time, and I'm now realizing that probably it wouldn't work with wait_for_async_insert = 0

alexey-milovidov commented 2 years ago

Yes, but the idea is great - to return the actually inserted data. I dropped this idea here three years ago: https://github.com/ClickHouse/ClickHouse/issues/5912