How can i speed up this Indexed View?

后端 未结 7 1866
难免孤独
难免孤独 2020-12-15 23:34

I have a simple Indexed View. When I query against it, it\'s pretty slow. First I show you the schema\'s and indexes. Then the simple queries. Finally a query plan screnie.

7条回答
  •  天涯浪人
    2020-12-16 00:18

    I recently built a large database containing hundreds of millions of call detail records and there are some functions I was using in queries and views that I turned into persisted computed columns. This worked out much better because I could index on the computed column.

    I wasn't using SQL Enterprise though so I didn't get the opportunity to use indexed views. Is the indexed view supposed to be able to index the deterministic results of the UDF?

提交回复
热议问题