Indexed Views - EXACTLY what is stored...

  • It would seem to me, given the number of columns he's accessing, that he probably has an equivalantly large row/recordset being returned to the view.  In that case, an indexed view in his situation would, for those specific tables, double the amount of hard drive space required.  And if you're pinching pennies, hard drive space is at a premium.

    If the "view" is being used in a report, though, like via Crystal or SSRS, it's just as easy to create it as a Proc which will store the execution plan and still optimize retrieval (somewhat).

    And yet... A view/report with 255 columns??  I certainly wouldn't want to read through it.  I can barely make it through a report that has more than 10.  @=)

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • An index is meaningless without an underlying table. Therefore it makes no sense to ask if an indexed view will store the index only. What would be the point of it? Any query using that view would end up joining the other tables to retrieve the rest of the data, so there wouldn't be any difference between using the view or including all those tables in the query to begin with.

  • Sam,

    Don't be too hard on the the people who ask this question.  I myself asked the question when I was first working on my MCDBA.  I had no experience with true relational databases, so I certainly didn't understand the difference between an indexed view and a regular view.  It's no surprise someone is asking it as none of the documents MS puts out regarding this are terribly clear to someone with no previous experience in this sort of thing.

    That being said, I sincerely believe the only truly stupid question is the one no one asked.  How can you learn anything without asking questions?  I don't care how obvious the answer is, if a person isn't sure, he or she should ask.  After all, the answer he/she gets might not be the obvious one at all.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Please tell me: What part of my reply is "hard on the people who ask this question"? Where did I write anything about a "stupid question"? Where did I say one should not ask questions? It looks like you are projecting your own feelings into my reply.

    In any case, I don't see why you have a problem when someone points at the obviousness of an answer: that's part of the learning process. I've asked *many* questions in my life, some of them truly stupid, and it *never* bothers me if someone tells me the question doesn't make sense or has an obvious answer. If I don't see that , it may be because there is something basic I don't truly understand, and when that happens I usually ask more questions, or hit the books until I get it. And it feels GOOD when I get to the point where I see why the question didn't make sense or why the answer was obvious.

  • Ahhh, the joys of our electronic world, short of emoticons (:sick and <grins>, it is often difficult to judge the intent of the message...

    Joe

     

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply