A SELECT
query, which is an intermediate result for another query, as known, can be either written by a CTE, view or a nested SELECT query (SELECT * FROM (SELECT ... ) a
).
Now I want to build a query use one of the three methods as the intermediate result. Should my query logic remains same, is there any difference on performance when using one of the three methods to build my query? (During my build, no advanced and specific topic on either way is used, such as recursive CTE, indexed view, USING ...MERGE ...
etc., just fundamental syntax but complexity might be high.)