# Greptime 双周精选 （9.18-10.15）｜ 5-20倍性能提升，新引擎 Mito2 发布

Source: https://greptime.cn/blogs/2023-10-18-biweekly

## 内容概述

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

在过去四周中，我们度过了本年度最长的节假日，但不负众望在节后正式上线 GreptimeDB v0.4，同时全英文版的线上 Meetup 也圆满结束。以下是这段时间的总结：

- 成功完成了 GreptimeDB v0.4 并正式打出 0.4 第一个 tag，v0.4 的具体升级动作为：重构了整个分布式架构，切换到新研发的 Mito 引擎；

- 不断优化新的 Mito 引擎上的查询性能；

- 基于 v0.4 对 TSBS 进行了重新测试，结果显示查询性能与 v0.3 相比提高了 5~20 倍。但与 InfluxDB 和 TimescaleDB 相比，性能仍有差距；

- 增加 Android 和 Windows 制品。

## 社区贡献者名单

在过去的两周里，GreptimeDB 共合并了 193 个 PR，其中有 4 位独立贡献者，累计 6 个 PR 被成功合并，还有很多待合并的 PR。

祝贺以下各位在过去 2 周内成为我们活跃的贡献者：

- @[NiwakaDev](https://github.com/NiwakaDev) ([db#2481](https://github.com/GreptimeTeam/greptimedb/pull/2481) [db#2490](https://github.com/GreptimeTeam/greptimedb/pull/2490))

- @[Lilit0x](https://github.com/Lilit0x)([db#2410](https://github.com/GreptimeTeam/greptimedb/pull/2410) [db#2549](https://github.com/GreptimeTeam/greptimedb/pull/2549))

- @[LinFeng Qian](https://github.com/TheWaWaR)（[db#2459](https://github.com/GreptimeTeam/greptimedb/pull/2459))

- @[Yun Chen](https://github.com/masonyc)（[db#2594](https://github.com/GreptimeTeam/greptimedb/pull/2594)）

🎉 热烈欢迎 @[Yun Chen](https://github.com/masonyc) 作为新的贡献者加入社区并成功合并了首个 PR [db#2594](https://github.com/GreptimeTeam/greptimedb/pull/2594)，还有更多来自其他独立贡献者的 PR 正在等待合并。

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

## PR 亮点

### [db#2535](https://github.com/GreptimeTeam/greptimedb/pull/2535) v0.3 -> v0.4 升级相关指令

为了进行彻底地优化，不受历史包袱干扰 0.3 -> 0.4 有一些 breaking change，需要停机升级。为此我们提供了升级工具，稍晚会在官方文档中加入升级手册，大致步骤如下：

1. 创建一个新的 0.4 集群；

2. 关闭旧集群流量入口（停写）；

3. 通过 CLI 升级工具导出数据；

4. 导入数据到新集群；

5. 入口流量切换到 0.4 新集群。

### [db#2594](https://github.com/GreptimeTeam/greptimedb/pull/2594) 丰富了 sqlness 测试场景

体验优化，仍然有许多 Options 使用 u64 来配置大小或者时长，这个 PR 将这些晦涩难懂的值改为用可读大小（ReadableSize）和可读时长（ReadableDuration）来表示。本个 PR 来自社区的 Contributor，感谢社区的贡献。

### [db#2574](https://github.com/GreptimeTeam/greptimedb/pull/2574) [db#2541](https://github.com/GreptimeTeam/greptimedb/pull/2541)  支持构建 WIndows 和 Android 平台制品

## Good First Issue

### [db#2500 减少技术债务](https://github.com/GreptimeTeam/greptimedb/issues/2500) 

Standalone 版也支持了创建 Multi-Region 的 Table，因此我们可以将 `tests/cases/distributed/show` 和 `tests/cases/standalone/show` 移至公共目录 `(tests/cases/standalone(distributed)/common)` 以减少技术债务。

困难指数：🌟

### [db#1540 完善 Prometheus 兼容性，支持格式化 PromQL 表达式](https://github.com/GreptimeTeam/greptimedb/issues/1540)

Prometheus server 的 `/api/v1/format_query` 接口可以以美观的方式格式化 PromQL 表达式。这也需要在 `promql-parser` 中实现一些 util trait。

困难指数：🌟🌟

### [db#1529 从 tokio-console 导出 tokio 运行时指标](https://github.com/GreptimeTeam/greptimedb/issues/1529)

通过 `tracing` 库从 tokio-console 收集数据（通过添加控制台层），并将跟踪到的数据导出到指标订阅者。

困难指数：🌟🌟🌟

### [db#2595 修复非法的 SchemaNameKey 格式](https://github.com/GreptimeTeam/greptimedb/issues/2595)

`-` 字符在 catalog/schema 名称中不受支持，但是在创建 Database 是可以使用引号来绕过此限制，这会导致其他组件出问题。


困难指数：🌟🌟🌟

## 新鲜事

### 更新了 Developer Guide

更新了 developer guide ，方便用户快速了解 GreptimeDB 的最新架构：https://docs.greptime.com/developer-guide/overview

## 关于 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/
