8 ms·
Hydra: Column-Oriented Postgres
- hankchinaski 3y agoNot affiliated just sharing as I thought it would be interesting
- 392 3y agoAny thoughts on Databend? I was really impressed by the minimal time to set it up and the 100x faster inserts with parquet upload. But it doesn't seem to be picking up HN hype.
- gregw2 3y agoThanks. Is there a list somewhere of Postgres-based columnar datastores (and which are MPP/clustered vs single/SMP-node)? * Citus (cstore_fwd) extension * Azure CosmosDB for PostgreSQL * GCP AlloyDB for PostgreSQL * AWS Redshift (but very old Postgres base)
- hankchinaski 3y agoFor sure there are GitHub lists somewhere. I recently had to research for olap Postgres compatible workloads and I know major ones: redshift, clickhouse, hydra
- wmf 3y agoTimescaleDB?
- claytonjy 3y agoI consider Timescale to be more of a hybrid than a "pure" columnar DB. IIRC the latest chunks are row-wise, but it goes columnar for older chunks to compress them. You can do a lot of OLAPish stuff, but it's arguably OLTP-first.
- hazaskull 3y agoNot Postgres-based (but wire- and mostly syntax-compatible): cockroachDB using column families is much like a columnar MPP. Yugabyte is PG-based and MPP but not columnar.
- riku_iki 3y ago> cockroachDB using column families is much like a columnar MPP. I am wondering why they are saying it is not for OLAP workload..
- hazaskull 3y agoThey don't optimize for it and I suppose the data distribution is primarily aimed at parallel OLTP rather than OLAP. Just wanted to mention that design-wise it is similar but that's indeed not all there is to it. I'd be hesitant to store large volumes of data on a single PG instance; don't see how a single-writer, filesystem-based database is suitable at all for data that is large enough to warrant columnar storage
- riku_iki 3y agoso, what would be your db choice for OLAP?
- hazaskull 3y agoNo expert but I'd say you'd rather be looking at bigquery, Redshift, Clickhouse, Snowflake, etc.
- esafak 3y agoYou can also go HTAP with TiDB which has TiKV for OLTP and TiFlash (Raft-based columnar replicas) for OLAP.
- riku_iki 3y agoI am more interested in actual OLAP than HTAP, and don't see strong OSS OLAP offering on the market right now, my rants in previous discussion: https://news.ycombinator.com/item?id=36992039 https://news.ycombinator.com/item?id=36992039 But I should look at TiDB, they looks like interesting and relatively mature project.
- mslot 3y agoNote that cstore_fdw ≈ Citus columnar (modernized using table access method) ≈ Azure Cosmos DB for PostgreSQL (managed Citus service) ≈ Hydra (a Citus columnar fork) Fwiw, the main use case we had in mind when developing the Citus columnar table access method was compression of old data in a time-partitioned table. Citus is commonly used for real-time analytics on time series data. That involves more materialization than typical OLAP reporting use cases. However, you might still want to keep the source data in the database for ad-hoc queries or future materialization and it's preferable to keep the source data in compressed form. Redshift is specifically architected for ad-hoc OLAP queries. AlloyDB I'm not sure.
- arp242 3y agoShow HN: Hydra 1.0 – open-source column-oriented Postgres - https://news.ycombinator.com/item?id=36987920 https://news.ycombinator.com/item?id=36987920 - Aug 2023 (80 comments)
- mdaniel 3y agoAnd just like last time, watch out for the misleading GitHub license detector because it's not entirely Apache as the GitHub summary claims but rather *some* is Apache and buried in the interior is some AGPL stuff: https://github.com/hydradatabase/hydra#license https://github.com/hydradatabase/hydra#license
- apgwoz 3y agoHow far we’ve come for MSFT to have a project (Citus, which Hydra forks from) released under the AGPL.
- tristan957 3y agoI thought Microsoft bought Citus. If so, the AGPL code might've existed prior to the acquisition.
- apgwoz 3y agoAll of Citus is AGPL, so either MSFT bought it like that, or it made it like that. Either way, embracing the AGPL was not on my MSFT bingo card.
- didip 3y agoIt doesn't look fast compared to others in ClickBench: https://benchmark.clickhouse.com/#eyJzeXN0ZW0iOnsiQXRoZW5hIChwYXJ0aXRpb25lZCkiOmZhbHNlLCJBdGhlbmEgKHNpbmdsZSkiOmZhbHNlLCJBdXJvcmEgZm9yIE15U1FMIjpmYWxzZSwiQXVyb3JhIGZvciBQb3N0Z3JlU1FMIjpmYWxzZSwiQnlDb25pdHkiOmZhbHNlLCJCeXRlSG91c2UiOmZhbHNlLCJjaERCIjpmYWxzZSwiQ2l0dXMiOmZhbHNlLCJDbGlja0hvdXNlIChkYXRhIGxha2UsIHBhcnRpdGlvbmVkKSI6ZmFsc2UsIkNsaWNrSG91c2UgKFBhcnF1ZXQsIHBhcnRpdGlvbmVkKSI6ZmFsc2UsIkNsaWNrSG91c2UgKFBhcnF1ZXQ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XJnZSI6dHJ1ZSwicmEzLjR4bGFyZ2UiOnRydWUsInJhMy54bHBsdXMiOnRydWUsIlMyIjp0cnVlLCJTMjQiOnRydWUsIjJYTCI6dHJ1ZSwiM1hMIjp0cnVlLCI0WEwiOnRydWUsIlhMIjp0cnVlfSwiY2x1c3Rlcl9zaXplIjp7IjEiOnRydWUsIjIiOnRydWUsIjQiOnRydWUsIjgiOnRydWUsIjE2Ijp0cnVlLCIzMiI6dHJ1ZSwiNjQiOnRydWUsIjEyOCI6dHJ1ZSwic2VydmVybGVzcyI6dHJ1ZSwidW5kZWZpbmVkIjp0cnVlfSwibWV0cmljIjoiaG90IiwicXVlcmllcyI6W3RydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWVdfQ== https://benchmark.clickhouse.com/#eyJzeXN0ZW0iOnsiQXRoZW5hIC...
- n00binc 3y ago[dead]
- nitinreddy88 3y agoWhenever I see DuckDB, it's the perfect one needed for OLAP queries in terms of performance and efficiency. One thing I couldn't wrap my head around, why there is no standalone version? What would be typical data pipeline/architecture to use DuckDB as in process OLAP engine? How would it achieve storage of data (large data volume)
- vladsanchez 3y agoWith Apache Arrow. https://duckdb.org/2023/08/04/adbc.html https://duckdb.org/2023/08/04/adbc.html
- chrisjc 3y ago> One thing I couldn't wrap my head around, why there is no standalone version? Standalone version of what? DuckDB? If you mean DuckDB, there is: https://duckdb.org/docs/archive/0.8.1/installation/index https://duckdb.org/docs/archive/0.8.1/installation/index > How would it achieve storage of data (large data volume) - There are so many ways you can do this that you end up going down many rabbit holes... - Locally on your own machine's local storage. - On AWS you could use EBS, EFS, expandable /tmp, S3... - On a Data Lake you could use parquet/json/csv/etc, hive, and in version 0.9.0 (Sept 11th) you could use Apache Iceberg. And probably so many other options I haven't even thought or read about...
- mcdonje 3y agoI think duckdb is more of a columnar sqlite.
- totetsu 3y agoAn intro article that explains the what and why https://www.hydra.so/blog-posts/2022-12-13-how-we-built-fastest-postgres-db-for-analytics https://www.hydra.so/blog-posts/2022-12-13-how-we-built-fast...
- totetsu 3y agoAnd a bit further down the rabbit hole if you need. structure of heap table in postgresql with pictures. https://medium.com/quadcode-life/structure-of-heap-table-in-postgresql-d44c94332052 https://medium.com/quadcode-life/structure-of-heap-table-in-...
- tomnipotent 3y agoDishonest for them to use the default "Postgres" for the ClickBench comparison instead of "Postgres (tuned)", which uses similar config settings to Hydra and tells a very different story. https://benchmark.clickhouse.com/#eyJzeXN0ZW0iOnsiQXRoZW5hIChwYXJ0aXRpb25lZCkiOmZhbHNlLCJBdGhlbmEgKHNpbmdsZSkiOmZhbHNlLCJBdXJvcmEgZm9yIE15U1FMIjpmYWxzZSwiQXVyb3JhIGZvciBQb3N0Z3JlU1FMIjpmYWxzZSwiQnl0ZUhvdXNlIjpmYWxzZSwiQ2l0dXMiOmZhbHNlLCJjbGlja2hvdXNlLWxvY2FsIChwYXJ0aXRpb25lZCkiOmZhbHNlLCJjbGlja2hvdXNlLWxvY2FsIChzaW5nbGUpIjpmYWxzZSwiQ2xpY2tIb3VzZSI6ZmFsc2UsIkNsaWNrSG91c2UgKHR1bmVkKSI6ZmFsc2UsIkNsaWNrSG91c2UgKHpzdGQpIjpmYWxzZSwiQ2xpY2tIb3VzZSBDbG91ZCI6ZmFsc2UsIkNyYXRlREIiOmZhbHNlLCJEYXRhYmVuZCI6ZmFsc2UsImRhdGFmdXNpb24iOmZhbHNlLCJBcGFjaGUgRG9yaXMiOmZhbHNlLCJEcnVpZCI6ZmFsc2UsIkR1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VlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZSx0cnVlLHRydWUsdHJ1ZV19 https://benchmark.clickhouse.com/#eyJzeXN0ZW0iOnsiQXRoZW5hIC...
- jallasprit 3y agoNobody mentioned this yet, but the design on this site really feels unique and crafted with passion. Good job!
- hankchinaski 3y agoIt is! I noticed a lot of startups recently are building on webflow!
- teacpde 3y agoIt is beautiful and unique, but I have a hard time making the connections between a database and the ancient elements.