Indexed views & Nhibernate - NOEXPAND Hint?

烂漫一生 提交于 2019-12-23 19:57:22

问题


Is it possible 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.


回答1:


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>


来源:https://stackoverflow.com/questions/6269549/indexed-views-nhibernate-noexpand-hint

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!