Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server-2008
1.where are views stored once they are created?
2.if indexes are created on views where are it stored?
3.does the indexes created on view doesnt reflect base tables?if "NO" y?
4.how does indexes arranged in views...as by definition " view ia a complied query"?
 

please giv me clarification....?
 

thans in advance
Posted 19-Feb-13 21:24pm
Comments
Ankur\m/ at 20-Feb-13 2:32am
   
Try Google search. You will get answer faster than typing + reply time.
Edit: See the first answer. Found using Google search. ;)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

1.where are views stored once they are created?
In the current database. Have a look.
To see the view:
SELECT * FROM sys.[views] v
 
To see the view definition(SQL Query) :
 
SELECT * FROM sys.sql_modules sm WHERE sm.definition LIKE '%yourviewname%'
 

2.if indexes are created on views where are it stored?
In the local disk specially for non clustered index. Again to see the definition use the above query.
 
3.does the indexes created on view doesnt reflect base tables?if "NO" y?
Are talking about indexed view? No it does not reflect the underlying tables. because when appropriate index is created on views, the index is used by the optimizer. If the index(created on view) is not appropriate one, in that case optimizer go for index created on actual table.
 
4.how does indexes arranged in views...as by definition " view ia a complied query"?
As usual, but there are some restriction for indexed view. Actually when a query is run in the for the first time SQL Server creates a plan for it for subsequent runs.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 365
1 Sergey Alexandrovich Kryukov 319
2 CPallini 275
3 DamithSL 214
4 Maciej Los 185
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100