PostgreSQL 开源面向列的存储引擎?

发布于 2024-07-19 02:02:27 字数 86 浏览 9 评论 0原文

是否有任何开源项目正在为 PostgreSQL 创建面向列的存储引擎? 我知道雅虎内部创建了一个,并且有基于 PostgreSQL 构建的面向列的商业产品。

Are there any open source projects in the works to create a column-oriented storage engine for PostgreSQL? I know Yahoo created one in-house, and that there are commercial products built on PostgreSQL that are column-oriented.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

野味少女 2024-07-26 02:02:27

Citus Data 为 PostgreSQL 开发了一个开源列式存储扩展。 它可在 Apache License v2.0 下使用。 它支持 PostgreSQL 9.3 及更高版本。

首先,创建扩展和外部服务器:

CREATE EXTENSION cstore_fdw;

CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw;

接下来,创建一些外部表:

CREATE FOREIGN TABLE customer_reviews
(
    customer_id TEXT,
    review_date DATE,
    review_rating INTEGER,
    review_votes INTEGER,
    review_helpful_votes INTEGER,
    product_id CHAR(10),
    product_title TEXT,
    product_sales_rank BIGINT,
    product_group TEXT,
    product_category TEXT,
    product_subcategory TEXT,
    similar_product_ids CHAR(10)[]
)
SERVER cstore_server
OPTIONS(filename '/opt/citusdb/3.0/cstore/customer_reviews.cstore',
        compression 'pglz');

最后,将数据COPY到表中:

COPY customer_reviews FROM '/home/user/customer_reviews_1998.csv' WITH CSV;

可以像查询任何其他表一样查询外部表。 您甚至可以将它们与普通桌子一起加入。

更多示例和信息可在相关博客文章和< a href="https://github.com/citusdata/cstore_fdw" rel="noreferrer">项目主页。

Citus Data has developed an open source columnar store extension for PostgreSQL. It is available under the Apache License v2.0. It supports PostgreSQL 9.3 and higher.

First, creation the extension and a foreign server:

CREATE EXTENSION cstore_fdw;

CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw;

Next, create some foreign tables:

CREATE FOREIGN TABLE customer_reviews
(
    customer_id TEXT,
    review_date DATE,
    review_rating INTEGER,
    review_votes INTEGER,
    review_helpful_votes INTEGER,
    product_id CHAR(10),
    product_title TEXT,
    product_sales_rank BIGINT,
    product_group TEXT,
    product_category TEXT,
    product_subcategory TEXT,
    similar_product_ids CHAR(10)[]
)
SERVER cstore_server
OPTIONS(filename '/opt/citusdb/3.0/cstore/customer_reviews.cstore',
        compression 'pglz');

Finally, COPY data into the table:

COPY customer_reviews FROM '/home/user/customer_reviews_1998.csv' WITH CSV;

Foreign tables can be queried like any other table. You can even join them with regular tables.

More examples and information are available in a related blog post and the project's home page.

仙女山的月亮 2024-07-26 02:02:27

这里缺乏回应以及我自己的研究似乎表明确实没有开源计划向 PostgreSQL 添加列存储。

2008 年有人谈论雅虎可能外包 Everest(他们的 PostgreSQL 列存储后端),所以希望他们能够发布它。

The lack of responses here and my own research seems to indicate that there are indeed no open source initiatives to add column storage to PostgreSQL.

There was some talk in 2008 about Yahoo possibly outsourcing Everest (their column store back end for PostgreSQL), so here's hoping that they'll release it.

把人绕傻吧 2024-07-26 02:02:27

Greenplum 为 PostgreSQL 创建了面向列的存储引擎。

Greenplum has created a column-oriented storage engine for PostgreSQL.

冷月断魂刀 2024-07-26 02:02:27

当我使用 monetDB 时,我一直在寻找相同类型的扩展/实现。
Citus Data 找到 cstore_ftw 后,我从 monetDB 看到了这篇文章:https://www.monetdb.org/content /citusdb-postgresql-column-store-vs-monetdb-tpc-h-shootout

由于 cstore_ftw 使用 PostgreSQL 的火山式查询处理器,
我们立即怀疑这个组件将是限制
影响其性能的因素。

我还没有测试过自己,但(IMO)MonetDB 对待他们的东西是认真的。
我认为如果 MonetDB 为 PostgreSQL 创建一个扩展/实现那就太完美了。 现在我仍在使用 monetDB,同时寻找 PostgreSQL 的新功能。

I was looking for the same kind of extension/implementation while I was playing with monetDB.
After finding cstore_ftw from Citus Data I came into this post from monetDB: https://www.monetdb.org/content/citusdb-postgresql-column-store-vs-monetdb-tpc-h-shootout

Since cstore_ftw is using PostgreSQL's volcano-style query processor,
we immediately suspected that this component would be the limiting
factor to its performance.

I have not tested myself but (IMO) MonetDB are serious with their stuff.
I think it will be perfect if MonetDB creates an extension/implementation for PostgreSQL. Right now I still working with monetDB while looking for new features on PostgreSQL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文