Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating index on views?

Status
Not open for further replies.

Zargo

Programmer
Mar 21, 2005
109
Hi all,

I have an huge view. Is it possible to create indexes on views. Is it better to create tables in stead of views and index those tables, maybe tables are faster then views?

TIA,

Zargo
 
Tables will almost always be faster than views (if the views have joins in them).

Look up "indexed views" in BOL. You can index a view, however there are specific rules about indexing the view.

I'd probably recommend setting up indexes on the underlying tables.

If the view is queried a lot and is only needed for read access loading the data into a table nightly and reading off of that table will put much less load on the SQL Server.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top