Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store real time range in sst #1225

Merged
merged 6 commits into from
Sep 25, 2023

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Sep 22, 2023

Rationale

Currently CeresDB will store aligned time range when write SST, this will cause IO amplification for certain query.

For example, the SST only contains one row, and its timestamp is 10:01, its time range in metadata will be aligned to [10:00, 12:00), if query contains filter like timestamp > 10:01, currently query plan will include this SST, but in fact we could skip this SST to avoid unnecessary IO.

Detailed Changes

  • When do compaction, calculate time range based on every row, and store this in metadata.

Test Plan

  • Modified UT

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@jiacai2050 jiacai2050 force-pushed the feat-sst-timerange branch 3 times, most recently from ae51d40 to 3fab845 Compare September 25, 2023 06:40
Copy link
Contributor

@chunshao90 chunshao90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiacai2050 jiacai2050 merged commit f790738 into apache:main Sep 25, 2023
@jiacai2050 jiacai2050 deleted the feat-sst-timerange branch September 25, 2023 10:56
chunshao90 pushed a commit that referenced this pull request Sep 30, 2023
## Rationale
Followup PR of #1225, this PR add the same logic for memtable.

## Detailed Changes


## Test Plan
Integration tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants