I have several queries that use the WITH clause or the Common Table Expression clause, with the UNION ALL clause, to repeat a tree-like table on an SQL server, as described here . I would see a difference in performance if I were to CREATE the same VIEW, and not include it in the WITH clause and generate it every time I run the query? Would it be generally considered good practice to actually CREATE a view since it is used in several queries?
source share