# Sparse Primary Key Encoding Performance Boosted by 235%, Flat Format in Progress, Custom Headers for OTLP | Greptime Biweekly Report

Source: https://greptime.com/blogs/2025-09-03-greptimedb-biweekly-report

## Summary 

Together with our global community of contributors, GreptimeDB continues to evolve and flourish as a growing open-source project. We are grateful to each and every one of you.

Below are the highlights among recent commits:
- **Flat Format** moves forward with range scan and write-path work
- **Distributed query optimization**: prune irrelevant Regions at the planning stage
- **OTLP ingestion supports custom headers**
- Sparse primary key encoding is up to **235% faster**

## Contributors

For the past two weeks, our community has been super active with a total of **122 PRs** merged. **7 PRs** from **7 individual contributors** merged successfully and lots pending to be merged.

Congrats on becoming our most active contributors in the past 2 weeks:

> - @**[Arshdeep54](https://github.com/Arshdeep54)** *[db#6619](https://github.com/GreptimeTeam/greptimedb/pull/6619)* 
> - @**[aaraujo](https://github.com/aaraujo)** *[db#6780](https://github.com/GreptimeTeam/greptimedb/pull/6780)* 
> - @**[codephage2020](https://github.com/codephage2020)** *[db#6818](https://github.com/GreptimeTeam/greptimedb/pull/6818)*
> - @**[SNC123](https://github.com/SNC123)** *[db#6757](https://github.com/GreptimeTeam/greptimedb/pull/6757)* 
> - @**[WaterWhisperer](https://github.com/WaterWhisperer)** *[db#6863](https://github.com/GreptimeTeam/greptimedb/pull/6863)* 
> - @**[yihong0618](https://github.com/yihong0618)** *[db#6704](https://github.com/GreptimeTeam/greptimedb/pull/6704)*
> - @**[zqr10159](https://github.com/zqr10159)** *[db#6764](https://github.com/GreptimeTeam/greptimedb/pull/6764)* 

🎉 Welcome @**[aaraujo](https://github.com/aaraujo)** and @**[WaterWhisperer](https://github.com/WaterWhisperer)** to the community as a new contributor with a successfully merged PR, and more PRs from other individual contributors are waiting to be merged.

<figure>
<img src="/blogs/2025-09-03-greptimedb-biweekly-report/greptimedbnewcontributor.png" alt="（Figure 1: New Contributors of GreptimeDB）" style="width: 70%; margin: 0 auto"/>
<figcaption>（Figure 1: New Contributors of GreptimeDB）</figcaption>
</figure>

👏 A big THANK YOU to all our members and contributors! It is people like you who are making GreptimeDB a great product. Let's build an even greater community together.

## Highlights of Recent PRs

### [db#6505 High-cardinality-optimized Flat Format (ongoing)](https://github.com/GreptimeTeam/greptimedb/pull/6505)

Progress has been made across multiple PRs to push Flat Format forward: RecordBatch adaptation([db#6771](https://github.com/GreptimeTeam/greptimedb/pull/6771), [db#6786](https://github.com/GreptimeTeam/greptimedb/pull/6786)), range-scan functions([db#6817](https://github.com/GreptimeTeam/greptimedb/pull/6817)), and write-path integration([db#6866](https://github.com/GreptimeTeam/greptimedb/pull/6866)).

### [db#6752 Prune Regions by logical plan predicate](https://github.com/GreptimeTeam/greptimedb/pull/6752)

Regions that cannot satisfy the query predicate are skipped up front, reducing unnecessary scans and improving latency.

### [db#6777 Persist Metasrv internal metrics to internal tables](https://github.com/GreptimeTeam/greptimedb/pull/6777)

Makes critical cluster internals queryable via SQL for better monitoring and troubleshooting.

### [db#6773 Configurable headers for OTLP ingestion](https://github.com/GreptimeTeam/greptimedb/pull/6773)

Allows attaching custom headers when reporting metrics via OTLP to align with deployment requirements.

```sql
## Additional OTLP headers, only valid when using OTLP http
[logging.otlp_headers]
Authorization = "Bearer my-token"
Database = "My database"
```

### [db#6809 235% faster sparse primary key encoding](https://github.com/GreptimeTeam/greptimedb/pull/6809)
Substantial optimization of the sparse primary-key encoding path, reducing CPU overhead.

### [db#6816 Remote WAL replay checkpoints](https://github.com/GreptimeTeam/greptimedb/pull/6816)
Introduces replay checkpoints to bound startup replays, accelerating Datanode restarts in worst-case scenarios.

### [db#6764 Support to specify schema for Postgres KV backend](https://github.com/GreptimeTeam/greptimedb/pull/6764)

Adds a configuration option to choose the schema used by the Postgres KV backend.

## Good First Issue

### [Issue#6760 Add profile signal configuration for OLTP protocols](https://github.com/GreptimeTeam/greptimedb/issues/6760)

Keywords: OLTP, Profiling

Difficulty: Simple
