Sometimes queries would perform faster if one or more table expressions were evaluated individually & "materialized", rather than the optimizer/algebrizer transforming the query.Providing a query hint which enumerates those CTEs we want materialized would provide a more elegant alternative to temp tables/variables and manually breaking-out the query into steps. Of course, there will be times when a temp table, and appropriate interim indexes, will still be needed. But materializing as a worktable, could improve performance, while keeping the query SQL-esqe. (as opposed to procedural)
Category
Proposed Solution
Benefits
Other Benefits
Please wait...