Currently, keyed ASOF JOINs are suboptimal for the common use case where timestamps on both sides are temporally close. QuestDB builds a map of the right side, which is time-, memory-, and CPU-consuming, especially when the right side is significantly larger than the left side. We can leverage the fact that the timestamps on both sides are close to each other and avoid building the map altogether. This optimization should yield a significant performance boost for the common case. It's similar to the approach used in QuestDB pull request #4199.
Currently, keyed ASOF JOINs are suboptimal for the common use case where timestamps on both sides are temporally close. QuestDB builds a map of the right side, which is time-, memory-, and CPU-consuming, especially when the right side is significantly larger than the left side. We can leverage the fact that the timestamps on both sides are close to each other and avoid building the map altogether. This optimization should yield a significant performance boost for the common case. It's similar to the approach used in QuestDB pull request #4199.
This is a common use-case for market makers.