Skip to content

fix(sql): reduce write amplification for materialized views with small SAMPLE BY interval#5995

Merged
bluestreak01 merged 5 commits intomasterfrom
puzpuzpuz_smaller_mat_view_min_interval
Jul 30, 2025
Merged

fix(sql): reduce write amplification for materialized views with small SAMPLE BY interval#5995
bluestreak01 merged 5 commits intomasterfrom
puzpuzpuz_smaller_mat_view_min_interval

Conversation

@puzpuzpuz
Copy link
Copy Markdown
Contributor

Removes minimal refresh interval defined by cairo.mat.view.min.refresh.interval property. This property and its associated logic led to larger refresh interval being used in case of base table commits with a small time interval (e.g. a single timestamp commit). For instance, in case of a SAMPLE BY 1s even in case of a single timestamp commit the final refresh interval was 100s.

@puzpuzpuz puzpuzpuz self-assigned this Jul 29, 2025
@puzpuzpuz puzpuzpuz added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution Materialized View labels Jul 29, 2025
@puzpuzpuz puzpuzpuz requested a review from ideoma July 29, 2025 12:15
@puzpuzpuz
Copy link
Copy Markdown
Contributor Author

@ideoma thanks for the review!

@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 12 / 12 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/PropServerConfiguration.java 11 11 100.00%
🔵 io/questdb/cairo/mv/MatViewRefreshJob.java 1 1 100.00%

@bluestreak01 bluestreak01 merged commit 4f95560 into master Jul 30, 2025
34 checks passed
@bluestreak01 bluestreak01 deleted the puzpuzpuz_smaller_mat_view_min_interval branch July 30, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Incorrect or unexpected behavior Materialized View SQL Issues or changes relating to SQL execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants