@Greptime: GreptimeDB 的扁平格式查询现在可以在任何列上预过滤——标签、字段、时间戳——而不仅仅是主键。而…
摘要
GreptimeDB 的扁平格式查询现在支持在任何列(标签、字段、时间戳)上预过滤,而不仅仅是主键,性能提升高达 4.5 倍。此外,mito2 存储引擎移除了其遗留扫描路径,清理了约 1800 行代码。
查看缓存全文
缓存时间: 2026/05/08 19:37
GreptimeDB 的 flat-format 查询现在可以预过滤任意列——标签、字段、时间戳——而不仅仅是主键。与此同时,mito2 移除了遗留的扫描路径,删除了大约 1800 行代码。
双周报第 82 期: https://t.co/VDgBsaboRB
OpenDAL 0.56 与 CLI 元数据命令 | Greptime 双周报 - 第 82 期
来源:https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report
摘要 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#summary)
开发周期:2026-04-20 ~ 2026-05-03
以下是近期提交的亮点:
greptimeCLI 支持metadata put命令,可直接进行键值操作- Flat 格式查询在扫描数据文件前,可预过滤任意列
- 窗口函数查询能正确处理 TimeRange 精度和列别名
建议旧版本用户升级以获取这些修复和改进。
贡献者 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#contributors)
过去两周,共有 14 位贡献者 合并了 43 个 PR。其中 5 位社区贡献者 贡献了 8 个 PR。欢迎新贡献者:@QuakeWang (https://github.com/QuakeWang)、@BootstrapperSBL (https://github.com/BootstrapperSBL)、@onepizzateam (https://github.com/onepizzateam)、@JoeS51 (https://github.com/JoeS51)!
感谢我们的社区贡献者:
- @QuakeWang (https://github.com/QuakeWang):db#8051 (https://github.com/GreptimeTeam/greptimedb/pull/8051)、db#8036 (https://github.com/GreptimeTeam/greptimedb/pull/8036)、db#8021 (https://github.com/GreptimeTeam/greptimedb/pull/8021)
- @BootstrapperSBL (https://github.com/BootstrapperSBL):db#8035 (https://github.com/GreptimeTeam/greptimedb/pull/8035)
- @JoeS51 (https://github.com/JoeS51):db#7994 (https://github.com/GreptimeTeam/greptimedb/pull/7994)
近期 PR 亮点 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#highlights-of-recent-prs)
db#8003 (https://github.com/GreptimeTeam/greptimedb/pull/8003) chore: 将 opendal 更新至 0.56 rc2 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#db-8003-chore-update-the-opendal-to-0-56-rc2)
GreptimeDB 的存储层现在使用 OpenDAL 0.56,替换了之前的版本。此依赖更新保持了相同的对象存储接口,同时引入了上游的 bug 修复和改进。
db#7982 (https://github.com/GreptimeTeam/greptimedb/pull/7982) refactor(mito2): 移除 PrimaryKey 变体 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#db-7982-refactor-mito2-remove-primarykey-variants)
mito2 存储引擎移除了遗留的主键扫描路径,所有查询仅使用 flat 格式。此次清理从查询执行流水线中删除了大约 1800 行未使用的代码。
db#7989 (https://github.com/GreptimeTeam/greptimedb/pull/7989) feat(cli): 添加 metadata put 键和表命令 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#db-7989-feat-cli-add-metadata-put-key-and-table-commands)
GreptimeDB CLI 现在支持通过 metadata put 命令写入元数据,可直接进行键值操作和特定表的更新。用户可通过 --value-stdin 管道输入 JSON 负载,更新表信息和路由,避免 shell 转义问题。
db#7972 (https://github.com/GreptimeTeam/greptimedb/pull/7972) feat: 支持 flat 格式中任意列的预过滤 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#db-7972-feat-support-prefiltering-any-columns-in-flat-format)
此前,parquet 预过滤仅能通过编码键解码作用于主键列。现在预过滤支持所有列类型(标签、字段、时间戳),为简单谓词和复杂表达式(如 IN、BETWEEN)提供了专门的执行路径,在 TSBS cpu-max-all 查询上实现了 4.5 倍的性能提升。
db#8019 (https://github.com/GreptimeTeam/greptimedb/pull/8019) fix: 窗口排序精度 TimeRange 偏移一位 & 更好的别名跟踪 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#db-8019-fix-window-sort-off-by-one-precision-timerange-better-alias-track)
窗口排序优化现在能识别别名和包装的时间索引表达式,例如 SELECT ts AS timestamp ... ORDER BY timestamp 和 SELECT to_timestamp_millis(ts) ... ORDER BY ts,因此这些查询会使用更快的窗口排序执行路径,而非回退到常规排序。还修复了分区边界处的精度转换问题,防止时间戳单位变化时发生错误的行切片。
Good First Issue (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#good-first-issue)
Issue#7755 (https://github.com/GreptimeTeam/greptimedb/issues/7755) 功能请求:为 S3 对象存储支持 EKS Pod Identity / ECS 容器凭证端点 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#issue-7755-feature-request-support-eks-pod-identity-ecs-container-credentials-endpoint-for-s3-object-storage)
将 OpenDAL 依赖更新至包含 reqsign >=0.18.1 的版本,以支持 AWS 容器凭证端点,用于 EKS Pod Identity 和 ECS 任务角色。
- 关键词:存储、依赖
- 难度:简单
Issue#7987 (https://github.com/GreptimeTeam/greptimedb/issues/7987) feat: 添加 flow_statistics 系统表和 SHOW FLOW STATUS 命令,用于 flow 运行时可观测性 (https://greptime.com/blogs/2026-05-03-greptimedb-biweekly-report#issue-7987-feat-add-flow-statistics-system-table-and-show-flow-status-for-flow-runtime-observability)
添加一个名为 flow_statistics 的系统表和一个 SHOW FLOW STATUS SQL 命令,用于显示 flow 的运行时信息,如启动时间、运行时长、处理的数据量以及近期错误。
- 关键词:SQL、可观测性
- 难度:中等
相似文章
@Greptime: GreptimeDB 六月的大部分工作归结为一个想法:如果过滤器无法到达数据,那么它就没用。在分布式查询中…
GreptimeDB 通过启用远程动态过滤器在运行时下推到 datanode 扫描,并优化优化器使其在 MergeScan 包装远程计划之前运行,从而确保过滤器到达数据,提升了分布式查询性能。JSON v2 列现在支持类型提示。
@Greptime: GreptimeDB v1.1.0 发布,PromQL rate/increase 查询速度提升高达97%,整体查询时间降低20-40%,TS… 上速度提升高达4.5倍
GreptimeDB v1.1.0 已发布,提供高达97%的PromQL查询加速,整体查询时间降低20-40%,在TSBS扫描密集型查询上性能提升高达4.5倍,并支持对现有表进行在线重分区。
@Greptime: DataFusion 在去年九月向上游合并了动态过滤下推功能。GreptimeDB v1.0 将其接入 Mito 扫描层。…
GreptimeDB v1.0 集成了 DataFusion 的动态过滤下推功能,通过将运行时边界推送到扫描层来加速 TopK 查询,在 50 亿行的 trace 表上将查询时间从 29 秒降低到 0.21 秒。
@Greptime: 我们更新了对GreptimeDB内部存储引擎Mito2的深入解析,涵盖LSM-tree写入路径、列式Parquet SST等……
GreptimeDB的Mito2存储引擎采用LSM-tree设计,结合列式Parquet SST、三级扫描剪枝以及TWCS压缩。该博客文章对其架构进行了全面解析。
@Greptime: GreptimeDB v1.3.0-alpha.1 — PromQL 原生直方图,wide: 选择,rate()/delta(),向量操作符,聚合,…
GreptimeDB v1.3.0-alpha.1 引入了 PromQL 原生直方图和向量操作符,以增强可观测性,并新增了对 OTLP traces 和 RISC-V 64 构建的支持。