Tag Info

New answers tagged


One answer not yet given is that it can interfere with predicate pushing which can greatly affect performance. An example is rolling up a large set of data into a 10 line summary and then add a top N with order by: select * from TheView For that case performance should not be significantly affected by including a top/order within the view. However for ...


The effect of ORDER BY is only mandatory on the same query level. Your view acts as derived table and if you just SELECT * FROM inv_groups_vw, the order is preserved. However, when adding another WHERE clause to the outer SELECT, you would have to add ORDER BY to the outer query as well. In your particular case, the order of rows is not guaranteed, even ...

Top 50 recent answers are included