18 ms·
In Postgresql, having an append only table like that and using a "window" for queries would lead to very bad performance as the whole table would have to be sca
by greatgib 2y ago
In Postgresql, having an append only table like that and using a "window" for queries would lead to very bad performance as the whole table would have to be scanned for the window function to work. And that could be terrible when you have hundred of thousands of rows.
I'm wondering if the situation is different with clickhouse? Or if it is just that no one cares as your requests to clickhouse are supposed to be less frequent and so it is not a problem if the request takes several minutes to complete?
- Elucalidavah 2y ago> if the situation is different with clickhouse Somewhat. Unlike postgres, clickhouse lets you throw more CPU resources at the problem. And there shouldn't be a need to scan the whole table.
- saisrirampur 2y agoOP here. It depends on the workload/query - number of columns in the query, filters, presence of aggregates, etc. Overall, I've seen ClickHouse perform well with window functions. This is a common strategy customers use to deduplicate data.