cstore_fdw - PostgreSQL 柱状存储扩展


Apache
Linux
C/C++

软件简介

cstore_fdw 实现了 PostgreSQL 数据库的柱状存储,用于对批量加载的数据进行分析的场景。

该扩展使用了 Optimized Row Columnar (ORC) 格式的数据存储布局。ORC 提升 Facebook 开发的 RCFile
格式,带来如下好处:

  • 压缩: Reduces in-memory and on-disk data size by 2-4x. Can be extended to support different codecs.

  • 列预测: Only reads column data relevant to the query. Improves performance for I/O bound queries.

  • 跳过索引: Stores min/max statistics for row groups, and uses them to skip over unrelated rows.

此外,我们使用了 PostgreS 外部数据封装 API 和类型呈现,带来:

  • Support for 40+ Postgres data types. The user can also create new types and use them.

  • Statistics collection. PostgreSQL’s query optimizer uses these stats to evaluate different query plans and pick the best one.

  • Simple setup. Create foreign table and copy data. Run SQL.