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.
Author |
Topic |
DGHall
Starting Member
1 Post |
Posted - 2008-04-25 : 12:50:29
|
Can someone show me how to create an index on the lrsn field in the below view. This view indexes are totally new to me but are needed due to slow performance.ThanksDG HallCREATE VIEW dbo.V_Comm_Imp_SummaryASSELECT TOP 100 PERCENT cu.Comm_Use, cu.year_built, cu.lrsn, dbo.V_Comm_AG_Area.area AS AG_Area, dbo.V_Comm_Bsmt_Area.area AS BG_Area, cu.extension, dbo.v_CommUse_Description.use_descriptionFROM dbo.V_Comm_Use cu INNER JOIN dbo.v_CommUse_Description ON cu.Comm_Use = dbo.v_CommUse_Description.Comm_Use LEFT OUTER JOIN dbo.V_Comm_Bsmt_Area ON cu.lrsn = dbo.V_Comm_Bsmt_Area.lrsn LEFT OUTER JOIN dbo.V_Comm_AG_Area ON cu.lrsn = dbo.V_Comm_AG_Area.lrsn |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-04-25 : 13:21:50
|
Check this one before going for it:http://www.sqlteam.com/article/indexed-views-in-sql-server-2000 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-04-25 : 13:57:28
|
note that TOP 100 PERCENT is completly irrelevant in the view._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
|
|
|
|
|