开发者

Indexed views & Nhibernate - NOEXPAND Hint?

Is it possibl开发者_JAVA百科e to configure NHibernate to issue the NOEXPAND hint when it executes a select statement against an indexed view? SQL Server always skips the views and goes straight to the base tables when executing queries unless the hint is used.


Here is a hack I tried and it worked. Just added (NOEXPAND) to the "table" name.

<class name="ClassName" mutable="false" table="vw_ViewName (NOEXPAND)">
...
</class>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜