• jascunce (2/13/2012)


    Revenant (2/13/2012)


    I ran your code under R2 DataCenter, up to date, and got 'Warning: Index hints supplied for view 'dbo.v1' will be ignored.' 5 times.

    The same results regarding the warning message were returned from SQL 2008 R2 instances, Std edition, RTM as well as sp1.

    Thanks, Revenant and Jascunce! That confirms my suspicion.

    Did you also check the actual execution plan to confirm if the query optimizer used (an index on) the base table or (an index on) the view?


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/