SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


VIEWS 3


VIEWS 3

Author
Message
Michael Riemer
Michael Riemer
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3110 Visits: 656
Thanks for the nice easy question. Had to think about the objects held in the system views, but figured that wasn't what you were testing and where trying to cover with the "space used for the Create Statement" - since you can't create it without populating all the system views!
dawryn
dawryn
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3482 Visits: 920
Koen Verbeeck (3/20/2012)
That is the space for the CREATE VIEW statement. That is stored in the sys.sql_modules catalog view. What I'm going after is that extra information is also stored in other catalog views. Not just the CREATE statement.

All mentioned is stored in system catalogs to make views operational and takes minimal space required after create view statement is executed. Catalog views are one form of means to query data from system catalogs.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: General Forum Members
Points: 62093 Visits: 13297
dawryn (3/20/2012)
Koen Verbeeck (3/20/2012)
That is the space for the CREATE VIEW statement. That is stored in the sys.sql_modules catalog view. What I'm going after is that extra information is also stored in other catalog views. Not just the CREATE statement.

All mentioned is stored in system catalogs to make views operational and takes minimal space required after create view statement is executed. Catalog views are one form of means to query data from system catalogs.


It takes minimal space, but space is space. And it ain't only the CREATE VIEW statement...


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
dawryn
dawryn
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3482 Visits: 920
Koen Verbeeck (3/20/2012)
It takes minimal space, but space is space. And it ain't only the CREATE VIEW statement...

I agree any metadata takes space, there is no question about it. Everything about database structure is stored in such form and it takes a lot less space than data and indexes.
Dana Medley
Dana Medley
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3138 Visits: 1706
Great easy question. I think I sat there with the answers already checked for a few minutes thinking to myself, "What's the catch?" and trying to figure out what it was, but there wasn't one. :-)



Everything is awesome!
mtassin
mtassin
SSCertifiable
SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)

Group: General Forum Members
Points: 7232 Visits: 72521
Koen Verbeeck (3/20/2012)
According to CREATE VIEW (Transact-SQL):


When a view is created, information about the view is stored in the following catalog views: sys.views, sys.columns, and sys.sql_expression_dependencies.


Information that is stored in system tables also consumes space...


Yah... I worried when I selected the "correct" answer that this would be used against me.

I was glad that it wasn't but I suspected somebody would say something about it.

some days when I answer these I'm convinced that no matter which answer I pick it will be wrong because it could be argued either way.



--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
DBA_Dom
DBA_Dom
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1020 Visits: 81110
dawryn (3/20/2012)
Koen Verbeeck (3/20/2012)
That is the space for the CREATE VIEW statement. That is stored in the sys.sql_modules catalog view. What I'm going after is that extra information is also stored in other catalog views. Not just the CREATE statement.

All mentioned is stored in system catalogs to make views operational and takes minimal space required after create view statement is executed. Catalog views are one form of means to query data from system catalogs.



I also agree. Can you CREATE anything without the extra minimal space consumed by the metadata.
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66261 Visits: 18570
Thanks Ron.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

SanDroid
SanDroid
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2410 Visits: 1046
Great question Bit Bucket. Concise and to the point with a clear answer. Cool
sknox
sknox
SSCarpal Tunnel
SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)

Group: General Forum Members
Points: 4010 Visits: 2924
Koen Verbeeck (3/20/2012)
According to CREATE VIEW (Transact-SQL):


When a view is created, information about the view is stored in the following catalog views: sys.views, sys.columns, and sys.sql_expression_dependencies.


Information that is stored in system tables also consumes space...


None of those system catalog views are indexed. Which means they aren't materialized. Which means data in them doesn't take up additional space.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search