Views

  • In SQL2000 Standard edition... Can you create indexes on views?

  • No. Indexed view is supported in enterprise and developer edtion.

  • Not true.  You can create indexes on views in Standard Edition as well.  Here is the quote from BOL:

    /******************

    Note  Indexed views can be created in any edition of SQL Server 2000. In SQL Server 2000 Enterprise Edition, the query optimizer will automatically consider the indexed view. To use an indexed view in all other editions, the NOEXPAND hint must be used.

    ******************/

     

  • Yes. You can create indexes on views in SE. But you have to use it in the query directly with the NOEXPAND hint.  For EE and DE, you do not need to use the view in the query at all. The query optimizer will use the view instead of the tables if it finds the index of the view will help. This is very important for an existing database. You donot need to rewrite any existing code to take advantage of the newly created indexed view. It's one of the ways to tune the performance of an existing system without touching it. That's why in sql server BOL, it says indexed view is a feature of EE and DE, not for SE.

    Rsharma, since the original poster just ask whether indexes can created on views in SE, you answer is more accurate. Tahnks.

     

     

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply