I was in an SQL class where the instructor said "DBAs don't like it when users create views, because they will clobber tablespace."

Obviously, I understand that any schema object will consume some tablespace, but isn't it a huge exaggeration to say that views will eat up tablespace, since all you need to store is just a query (and privileges and some other metadata), and as such they won't take significantly more space than an ordinary row in an ordinary table?

  • 1
    That is why he is an instructor and not an actual DBA. – Gaius Nov 18 '11 at 14:33

Not true, unless they meant "materialised views"

Permanent tablespaces are used to store user data and user created objects like tables, indexes and materialized views.

  • Correct, but even if the instructor meant Materialized View the statement would still be incorrect. I'm sure you would agree that a DBA wouldn't dislike Materialized Views simply because they take space. There are times when a MV should be used and the space it requires is completely justified. – Leigh Riffel Aug 22 '11 at 23:27
  • @Leigh Riffel: can you clarify please? An indexed view in SQL Server consumes space on disk – gbn Aug 23 '11 at 4:37
  • 2
    Huh? The question is tagged Oracle not SQL Server. Your answer is correct in the sense that a materialized view could use a significant amount of space, whereas a view would not. I was just pointing out that even if the instructor meant MV his statement would still have been incorrect because a DBA would be fine with a user creating a materialized view if it was necessary for the application regardless of how much space it consumed. Does that help? – Leigh Riffel Aug 23 '11 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.