Why does putting a WHERE clause outside view have terrible performance

前端 未结 5 1895
梦如初夏
梦如初夏 2021-02-12 21:09

Let\'s say you have a view:

CREATE VIEW dbo.v_SomeJoinedTables AS
SELECT
    a.date,
    a.Col1,
    b.Col2,
    DENSE_RANK() 
      OVER(PARTITION BY a.date, a.         


        
5条回答
  •  猫巷女王i
    2021-02-12 21:34

    As a work-around I would suggest using a function instead of a view so that you can pass in data parameter.

提交回复
热议问题