TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How did you scale your analytics workloads (Postgres)?

7 点作者 collinc7775 个月前
Our product has some reporting features that require aggregations &#x2F; analytics functionality. Some of the analytics workloads are time series, others are not and we generally expect these analytics queries to resolve in ~2.5s<p>We&#x27;ve recently decided to move these workloads to snowflake because we want to protect our transactional workloads.<p>The snowflake devex has been pretty bad because we&#x27;d need a snowflake &quot;instance&quot; for each dev&#x27;s postgres localhost, and we like that localhost postgres to be ephemeral. Additionally, it&#x27;d be nice to have this work all locally.<p>One interesting piece of software I came across is DuckDB. It&#x27;s lightweight. There&#x27;s no additional storage needed. It&#x27;s an interesting direction for me to test but I don&#x27;t know if it&#x27;ll satisfy our latency requirements.<p>How have you separated and scaled out your analytics workloads from postgres?

2 条评论

saisrirampur5 个月前
It depends on the scale - If you expect to scale to at least a few hundred GBs a (to multiple TBs), ClickHouse would be a safe and proven option. The Postgres + ClickHouse duo is a common pattern adopted by production-grade customers as their default data stack to solve transactional (OLTP) and analytical (OLAP) use cases.<p>ClickHouse also recently released Postgres CDC connector in ClickPipes for a seamless integration of Postgres. Now you can stream Postgres data into ClickHouse within a few minutes. <a href="https:&#x2F;&#x2F;clickhouse.com&#x2F;cloud&#x2F;clickpipes&#x2F;postgres-cdc-connector" rel="nofollow">https:&#x2F;&#x2F;clickhouse.com&#x2F;cloud&#x2F;clickpipes&#x2F;postgres-cdc-connect...</a> This was a result of the acquisition of PeerDB, an open-source Postgres CDC product - <a href="https:&#x2F;&#x2F;clickhouse.com&#x2F;blog&#x2F;clickhouse-welcomes-peerdb-adding-the-fastest-postgres-cdc-to-the-fastest-olap-database" rel="nofollow">https:&#x2F;&#x2F;clickhouse.com&#x2F;blog&#x2F;clickhouse-welcomes-peerdb-addin...</a><p>Disclaimer: This is Sai from ClickHouse&#x2F;PeerDB here. However, the answer above is based on multiple years of customer experiences. :)
thenaturalist5 个月前
DuckDB should give you everything with regards to DevEx that you seem to be needing.<p>You&#x27;re not specifying what volume we&#x27;re talking about here, but I&#x27;d be surprised if you can&#x27;t go a long way with DuckDB. Ultimately the bottleneck for latency in a non-big data scenario will be memory?<p>You can run it in a browser: <a href="https:&#x2F;&#x2F;github.com&#x2F;duckdb&#x2F;duckdb-wasm">https:&#x2F;&#x2F;github.com&#x2F;duckdb&#x2F;duckdb-wasm</a><p>DuckDB&#x27;s docs and blog are full of great content with regards to optimizing:<p>How to tune workloads: <a href="https:&#x2F;&#x2F;duckdb.org&#x2F;docs&#x2F;guides&#x2F;performancehow_to_tune_workloads.html" rel="nofollow">https:&#x2F;&#x2F;duckdb.org&#x2F;docs&#x2F;guides&#x2F;performancehow_to_tune_worklo...</a><p>Performance guide: <a href="https:&#x2F;&#x2F;duckdb.org&#x2F;docs&#x2F;guides&#x2F;performance&#x2F;overview.html" rel="nofollow">https:&#x2F;&#x2F;duckdb.org&#x2F;docs&#x2F;guides&#x2F;performance&#x2F;overview.html</a><p>Optimizers in DuckDB: <a href="https:&#x2F;&#x2F;duckdb.org&#x2F;2024&#x2F;11&#x2F;14&#x2F;optimizers.html" rel="nofollow">https:&#x2F;&#x2F;duckdb.org&#x2F;2024&#x2F;11&#x2F;14&#x2F;optimizers.html</a><p>I&#x27;m sure there is more.<p>If I were in your shoes, even if you don&#x27;t settle on DuckDB, it would be my go to benchmark due to ease of use and unoptimized speed.<p>Anything else out there like chDB (Clickhouse) or Apache Datafusion should be worth the effort.<p>For a detailed benchmark of DuckDB vs. Clickhouse for an orientation, see: <a href="https:&#x2F;&#x2F;bicortex.com&#x2F;duckdb-vs-clickhouse-performance-comparison-for-structured-data-serialization-and-in-memory-tpc-ds-queries-execution&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bicortex.com&#x2F;duckdb-vs-clickhouse-performance-compar...</a>