4 ms·
Three reasons I can think of: - Postgres is a row store optimized for transactional workloads, whereas Parquet is a column-oriented format optimized for analyt
by taffer 5y ago
Three reasons I can think of:
- Postgres is a row store optimized for transactional workloads, whereas Parquet is a column-oriented format optimized for analytical workloads.
- Database storage is typically very expensive SSD storage optimized for fast IO and high availability. Parquet files, on the other hand, can be stored in inexpensive object storage such as S3.
- Loading is an additional and possibly unnecessary step
- eatonphil 5y agoSure but what is the scenario where you wouldn't want to use DuckDB and you'd want to use PostgreSQL instead but wouldn't want to load into PostgreSQL? DuckDB is already a SQL engine. The only additional benefit I'd imagine from PostgreSQL would be stuff you get from it being on disk? But that's why I'm asking, I don't know.
- taffer 5y agoIt depends on your situation: If you already have a Postgres instance then the FDW is probably the easier solution.
- eatonphil 5y agoOh yeah that makes sense. I assumed the commenter was just looking for any system to run SQL over Parquet files. If you don't want to use this system that makes it easy, fair enough.
- taffer 5y ago> If you don't want to use this system that makes it easy, fair enough. Be kind. Don't be snarky. Have curious conversation; don't cross-examine. Please don't fulminate. Please don't sneer, including at the rest of the community. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- agons 5y agoIt didn't read unkind or snarky at all to me - just an amicable way of ending a thread of investigation where the result was a simple "a ha, I understand" moment.