Why does putting a WHERE clause outside view have terrible performance

前端 未结 5 1192
萌比男神i
萌比男神i 2021-02-12 21:00

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条回答
  •  长情又很酷
    2021-02-12 21:16

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

提交回复
热议问题