Which time-series join? ASOF, WINDOW, HORIZON, LT or SPLICE
Blog post from QuestDB
QuestDB’s guide explains why equality-based SQL joins are often unsuitable for independently timestamped time-series data and presents specialized joins designed around temporal relationships. ASOF JOIN attaches the most recent matching state to each event and can use TOLERANCE to prevent stale matches, WINDOW JOIN aggregates all observations within a time range around an event, and HORIZON JOIN retrieves the latest values at multiple fixed offsets before or after events for analyses such as markout curves. LT JOIN differs from ASOF by requiring a strictly earlier match, making it useful for bucketed data and avoiding look-ahead bias, while SPLICE JOIN preserves every update from two equally important streams by pairing each with the prevailing value from the other. The guide also covers LATERAL JOIN for executing queries per outer-row grouping, such as finding top trades per symbol, and describes restrictions on combining join types, recommending common table expressions when further aggregation or processing is needed. Using simulated foreign-exchange trades and quotes, it emphasizes selecting a join based on the desired output shape, from one contextual value per event to summaries, offset-based observations, previous bars, or a unified record of changes across two feeds.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.