An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
Hello Jianbo Yao (Centific Technologies Inc),
Welcome to the Microsoft Q&A forum.
materialize() caches a result set. It is useful when you reuse that result set multiple times during a query.
so it doesn’t need to be computed again when it’s used multiple times in the main query.
In your case, if View_SelectArgMax and View_SelectArgMin are used multiple times in your queries, then adding materialize to these variables can indeed improve performance.
This is because the results of these subqueries are computed once and then stored, reducing the amount of computation needed when they’re used again.
However, if these variables are only used once in your queries, then adding materialize might not lead to a noticeable improvement in performance.
I hope this helps. Please let me know if you have any further questions.