If merge is the prefered solution, one suggestion could be to move your data to SPDE, which will sort the input data on the fly using multi-threading. May still use some resources, but would be faster than using sort using indexes at least.
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!