Open
Conversation
New SQL reference page for the SUBSAMPLE clause covering LTTB, M4, and MinMax downsampling algorithms with SVG diagrams, runnable examples on fx_trades, gap-preserving LTTB, and configuration reference.
|
🚀 Build success! Latest successful preview: https://preview-424--questdb-documentation.netlify.app/docs/ Commit SHA: 50db1af
|
Avoid stretching all doc images by targeting only img[src*="/subsample/"] instead of article img.
Split gap SVG into three separate charts with individual legends. Add small gap to dataset to illustrate threshold behavior. Use QuestDB color palette (pink lines, cyan titles, gray dots). Match inline SQL examples to chart storytelling (24 hourly bars). Add boundary markers distinguishing gaps from bucket boundaries.
Tweak dataset so M4 visibly outperforms MinMax (late spike with pullback). Explain envelope, triangle method, and first/last advantage for users unfamiliar with downsampling.
Move gap-preserving LTTB right after LTTB. Add uniform (evenly spaced rows) and cadence (every Nth row with optional random offset) sections. Update syntax block and comparison table.
Add uniform (evenly spaced) and cadence (every Nth row) sections with SVG diagrams. Move gap-preserving LTTB under LTTB heading. Reorder MinMax before M4. Add relative cost row to comparison table.
Add uniform, cadence, and gap-preserving LTTB to the chart-ready examples section. Make DECLARE example demoable. Replace Grafana reference with generic programmatic integration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SUBSAMPLEclause - time-series downsampling that selects real rows (no interpolation)fx_tradesdemo datasetcairo.sql.subsample.max.rowsto configuration referenceSUBSAMPLEto sidebar under SELECT, after SAMPLE BYscripts/gen_subsample_svgs.pyfor rebuilding diagramsDependencies