# 部分场景 10 倍性能提升！GreptimeDB 布道师计划发布，首位布道师官宣 | Greptime 双周精选

Source: https://greptime.cn/blogs/2025-02-19-biweekly-report

## 内容概述
作为一个成长中的开源项目，GreptimeDB 的进展离不开来自全球的社区贡献者们，感谢各位！

最近的更新内容如下：

- **支持 Jaeger 查询协议**
- **统一创建索引的语法，并支持使用 ALTER 来修改跳数索引**
- **优化 Metrics 场景下的建表效率**
- **提升写入和刷盘的效率**

## 社区贡献者名单

在过去的四周里，GreptimeDB 共合并了 **140 个 PR**，其中有 **3 位独立贡献者**，累计 **19 个 PR** 被成功合并，还有很多待合并的 PR 。

祝贺以下各位在过去 4 周内成为我们最突出的贡献者：
 
> 注：按照 GitHub 用户名首字母顺序排列
> - @[ozewr](https://github.com/ozewr) ([db#5484](https://github.com/GreptimeTeam/greptimedb/issues/5484))
> - @[Stephan3555](https://github.com/Stephan3555) ([db#5441](https://github.com/GreptimeTeam/greptimedb/issues/5441))
> - @[yihong0618](https://github.com/yihong0618) ([db#5458](https://github.com/GreptimeTeam/greptimedb/issues/5458) [db#5453](https://github.com/GreptimeTeam/greptimedb/issues/5453) [db#5442](https://github.com/GreptimeTeam/greptimedb/issues/5442) [db#5433](https://github.com/GreptimeTeam/greptimedb/issues/54333) [db#5422](https://github.com/GreptimeTeam/greptimedb/issues/5422) [db#5398](https://github.com/GreptimeTeam/greptimedb/issues/5398) [db#5529](https://github.com/GreptimeTeam/greptimedb/issues/5529) [db#5523](https://github.com/GreptimeTeam/greptimedb/issues/5523) [db#5518](https://github.com/GreptimeTeam/greptimedb/issues/5518) [db#5507](https://github.com/GreptimeTeam/greptimedb/issues/5507) [db#5497](https://github.com/GreptimeTeam/greptimedb/issues/5497) [db#5491](https://github.com/GreptimeTeam/greptimedb/issues/5491) [db#5473](https://github.com/GreptimeTeam/greptimedb/issues/5473) [db#5470](https://github.com/GreptimeTeam/greptimedb/issues/5470) [db#5468](https://github.com/GreptimeTeam/greptimedb/issues/5468) [db#5467](https://github.com/GreptimeTeam/greptimedb/issues/5467) [demo-scene#72](https://github.com/GreptimeTeam/demo-scene/pull/72))

👏 欢迎 @[ozewr](https://github.com/ozewr) @[Stephan3555](https://github.com/Stephan3555) 作为新的贡献者加入到社区，并成功合并了 PR，还有更多来自其他独立贡献者的 PR 正在等待合并。

<figure>
<img src="/zh/blogs/2025-02-19-biweekly-report/image1.png" alt="（图 1：GreptimeDB 新晋 Contributor）" style="width: 80%; margin: 0 auto"/>
<figcaption>（图 1：GreptimeDB 新晋 Contributor）</figcaption>
</figure>

🎆 热烈欢迎 GreptimeDB 首位布道师 @[JetSquirrel(邓添)](https://github.com/JetSquirrel) 正式加入社区！他将深度参与 GreptimeDB 的技术布道、社区推广和开发者生态建设，与社区一起共同推动项目的成长和普及！

<figure>
<img src="/zh/blogs/2025-02-19-biweekly-report/image2.png" alt="（图 2：GreptimeDB 新晋布道师）" style="width: 80%; margin: 0 auto"/>
<figcaption>（图 2：GreptimeDB 新晋布道师）</figcaption>
</figure>

🎉 衷心感谢我们所有的成员，贡献者和布道者们！是你们的付出让我们的项目得以成功，也是你们让 GreptimeDB 成为一个更优质的产品。让我们一起努力，建立一个更棒的社区！

## GreptimeDB 布道师计划：携手共建下一代时序数据库技术生态
 
GreptimeDB 作为一款高性能、开源、云原生的时序数据库，致力于为开发者提供极具效率的数据基础设施体验。为凝聚全球技术爱好者与社区领袖的力量，GreptimeDB 正式推出 **「布道师计划」**，一个专为技术先锋打造的成长平台，旨在连接**热爱时序数据库、云计算与开源技术的开发者**，共同推动技术创新与知识共享。  

### **计划目标**  
- **技术赋能**：优先享受独家资源与工具，助力布道师深入探索 GreptimeDB 的核心技术与应用场景。
- **社区共建**：构建全球化交流网络，推动技术内容创作、开源协作与实践经验传播。  
- **领袖成长**：打造个人影响力，成为相关领域的意见领袖与 GreptimeDB 生态大使。  

### **核心权益**  
1. **深度技术资源支持**  
   - 优先获取 GreptimeDB 新功能的内测权限； 
   - 与 GreptimeDB 产品团队、核心开发者直接对话，参与技术路线设反馈； 
   - 免费、优先参与闭门技术培训、线上研讨会及 Greptime 参与/赞助/举办的相关会议。  

2. **内容创作与传播赋能**  
   - 获得原创技术文章、案例研究、开源项目等内容的官方推广支持（官网、社交媒体、开发者社区等）；  
   - 录制技术视频/音频、参与直播分享或 Meetup，或联合撰写电子书/白皮书； 
   - 优秀内容创作者将获得定制文创礼包及荣誉认证（Advocator）。  

3. **全球化社区网络**  
   - 加入 GreptimeDB 布道师专属社群，与全球顶尖开发者、企业用户及开源贡献者互动；
   - 优先参与线下/线上 Meetup、黑客松及开源贡献者计划。  

4. **品牌曝光与荣誉激励**  
   - 个人简介与作品收录至 GreptimeDB 官网「布道师相关」，提升行业影响力；
   - 年度评选杰出参与者，授予限量周边、证书及其他福利。  

### **申请条件**  
- **技术热情**：对时序数据库、数据分析、云计算或开源技术有浓厚兴趣；
- **分享精神**：乐于通过博客、演讲、代码贡献或社区活动学习和传播技术知识；
- **社区经验**：曾在技术社区、开源项目或行业会议中活跃者优先。

> 例如（任选其一/或复合型累计皆可）：
> - 发表社区内容相关 3 篇文章（至少）；
> - 在公共场合发表 2 次社区/项目相关的演讲（至少）；
> - 作为牵头人/主理人/陪聊录制 podcast 3 期（至少）；
> - 成功牵头/组织 2 次 GreptimeDB 社区相关活动（至少）；
> - 作为在社交平台和技术社区有明显影响力的非付费性质 Kol 宣传 GreptimeDB 社区至少 6 次（至少）；
> - ...

### **如何加入**  
1. **提交申请**：简单自我介绍并附上个人技术作品（文章、代码仓库、演讲视频等）；  
2. **审核与面试**：GreptimeDB 社区将评估申请者背景并与候选人深入沟通；
3. **正式加入**：通过审核后通过邮件正式确认，解锁全部权益并开启布道之旅！

**为何成为 GreptimeDB 布道师？**  
我们相信，技术的未来由社区驱动。无论您是资深开发者、技术博主，还是开源新星，GreptimeDB 布道师计划都将为您提供舞台，让您的洞察影响全球开发者，共同定义未来技术的无限可能。  

**立即行动，成为 GreptimeDB 生态的领航者！**  
 
*注：本计划最终解释权归 GreptimeDB 所有。*

## PR 亮点

### [db#5452 支持 Jaeger 查询协议](https://github.com/GreptimeTeam/greptimedb/issues/5452)

GreptimeDB 在 `/v1/jaeger` HTTP Endpoint 下兼容了 Jaeger v2 版本的部分查询协议：
- `/api/services`
- `/api/operations`
- `/api/traces`

现在用户可以通过 OpenTelemetry 协议写入链路数据，然后通过 Jaeger 协议进行查询和分析。

### [db#5486](https://github.com/GreptimeTeam/greptimedb/issues/5486) [db#5538](https://github.com/GreptimeTeam/greptimedb/issues/5538) 统一创建索引语法，并支持使用 `ALTER` 来修改跳数索引

[db#5486](https://github.com/GreptimeTeam/greptimedb/issues/5486) 统一了 GreptimeDB 创建索引的语法，解决了之前创建倒排，跳数和全文索引语法不一致的问题。有兴趣的读者可以查看对应的 Issue [db#5332](https://github.com/GreptimeTeam/greptimedb/issues/5332) 了解更多细节。

索引语法统一后，可以通过列约束来创建索引：

```sql
Column Constrain: ... <INDEX_TYPE> INDEX [WITH (...)]
```

以下语句展示了几种索引的创建方式：

```sql
CREATE TABLE IF NOT EXISTS system_metrics (
    host STRING,
    idc STRING FULLTEXT INDEX INVERTED INDEX,
    cpu_util DOUBLE,
    memory_util DOUBLE,
    disk_util DOUBLE,
    desc1 STRING,
    desc2 STRING FULLTEXT INDEX,
    desc3 STRING FULLTEXT INDEX,
    ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY(host, idc),
    TIME INDEX(ts)
);
```

用户现在可以通过 `ALTER` 命令来设置或者移除跳数索引：

```sql
ALTER TABLE table_name MODIFY COLUMN column_name SET SKIPPING INDEX WITH(granularity = 1024, type = 'BLOOM');
ALTER TABLE table_name MODIFY COLUMN column_name UNSET SKIPPING INDEX;
```

同时，通过 `ALTER` 修改全文索引时，必须指定 INDEX 关键字：

```sql
ALTER TABLE table_name MODIFY COLUMN column_name SET FULLTEXT INDEX WITH(analyzer = 'English', case_sensitive = 'true');
```

### [db#5503](https://github.com/GreptimeTeam/greptimedb/issues/5503) [db#5504](https://github.com/GreptimeTeam/greptimedb/issues/5504) 优化 Metrics 场景下的建表效率

在通过 Prometheus Remote-Write 协议写入数据时，GreptimeDB 可能需要自动创建大量表。此前，建表过程可能需要数分钟，导致用户需要等待较长时间后才能稳定写入数据。针对这一问题，db#5503 和 db#5504 优化了建表效率，现在在 Metric Engine 下创建 3000 个表的耗时从从分钟级提升到了秒级。

### [db#5451](https://github.com/GreptimeTeam/greptimedb/issues/5451) [db#5456](https://github.com/GreptimeTeam/greptimedb/issues/5456) [db#5455](https://github.com/GreptimeTeam/greptimedb/issues/5455) [db#5460](https://github.com/GreptimeTeam/greptimedb/issues/5460) 优化写入性能 

通过支持并行化写入过程中的部分操作和优化 memtable 实现，进一步提升了单 region 场景下的写入性能。现在，写入单 region 也能充分利用多核资源。

### [db#5518 `last_non_null` 表刷盘时去重效率提升 10 倍](https://github.com/GreptimeTeam/greptimedb/issues/5518)

在使用 `merge_mode` 为 `last_non_null `的表时，如果用户写入大量重复数据的数据，数据库可能会出现长时间无法将该表的数据刷到磁盘上的问题。主要原因是原有实现的去重效率较低，优化后该场景下刷盘的速度达到了 **10 倍左右的提升**！

# Good First Issue

### [db#5296 只在 `CreateFlowData` 中存储必要的字段，避免存放整个 `QueryContext`](https://github.com/GreptimeTeam/greptimedb/issues/5296)

- 难度：中等
- 关键字：查询，重构

## 关于 Greptime

[Greptime 格睿科技](https://greptime.cn/)专注于为可观测、物联网及车联网等领域提供实时、高效的数据存储和分析服务，帮助客户挖掘数据的深层价值。目前基于云原生的时序数据库 [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) 已经衍生出多款适合不同用户的解决方案，更多信息或 demo 展示请联系下方小助手（微信号：greptime）。

欢迎对开源感兴趣的朋友们参与贡献和讨论，从带有 good first issue 标签的 issue 开始你的开源之旅吧～期待在开源社群里遇见你！添加小助手微信即可加入“技术交流群”与志同道合的朋友们面对面交流哦~

Star us on GitHub Now: https://github.com/GreptimeTeam/greptimedb

官网：https://greptime.cn/

文档：https://docs.greptime.cn/

Twitter: https://twitter.com/Greptime

Slack: https://greptime.com/slack

LinkedIn: https://www.linkedin.com/company/greptime/
