apache / apache/arrow-flight-sql-postgresql

Improve `SELECT text` performance

未关闭
#177 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
116
派生
10
PR 合并指标
30 天内没有已合并 PR

描述

It's slower than the PostgreSQL protocol.

The followings may be related but we need to look into it:

* Building `arrow::RecordBatch` is slow?
* We need to build `arrow::RecordBatch`es to use `arrow::ipc::RecordBatchWriter()`. We need to copy PostgreSQL data for it. (Not zero-copy.)
* Should we add an API that writes Apache Arrow streaming format data without building `arrow::RecordBatch` to Apache Arrow C++?
* Calling `SPI_getbinval()` is slow?
* It calls `nocachegetattr()` https://github.com/postgres/postgres/blob/3edc6580c0e27fb8f13322efd255a88d20dda6c2/src/backend/access/common/heaptuple.c#L496-L712 and it's not a short function. Can we shortcut some operations?

贡献指南

打开贡献指南

调研方向

首先对 SELECT 文本路径进行 profiling,并将其与 PostgreSQL 协议进行比较,重点关注 Apache Arrow RecordBatch、RecordBatchWriter 以及 PostgreSQL 的 SPI_getbinval() 的构造。确定复制到 RecordBatch 还是 SPI_getbinval()/nocachegetattr() 占主导,然后将已完成的更改与 PostgreSQL 协议基线进行测量比较。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, postgresql
领域
backend, databases, performance
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。