Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Indexing views

Author  Topic 

Mondeo
Constraint Violating Yak Guru

287 Posts

Posted - 2008-03-17 : 07:39:08
Hi,

I've got some tables which are indexed on primary key and a couple of search columns.

I've also got some views based on these tables, some are quite complex. Do I index the views on the same search columns or do they automatically index themselves based on the tables they reference?

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-17 : 12:39:15
I dont think the view will index themselves.You might have to add a index to view column as well.
Go to Top of Page

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2008-03-17 : 20:00:08
Sorry to contradict, but queries against views are nothing special. All the indexes will still be available to your query, providing they would be accessible if you expanded the view query out.
Go to Top of Page
   

- Advertisement -