How view will help in performance and how can i identify tempdb is full

  • Hi,

    what is the main advantage of view.? How view will help in performance. consider i have the some complex select query and i am running that in sql server and it is taking lot of time. In this case if i use view, how it will affect? whether the time taken by select query will reduce?

    regards,

    vaithilingam.k

  • View is mainly used for encapsulation, that is, hiding the complexity. In terms of performance, It will not help you a lot. For that, you need to go with " indexed views "

  • vaithi.saran846 (12/29/2011)


    Hi,

    what is the main advantage of view.? How view will help in performance. consider i have the some complex select query and i am running that in sql server and it is taking lot of time. In this case if i use view, how it will affect? whether the time taken by select query will reduce?

    regards,

    vaithilingam.k

    If you're having problems with the performance of a complex query, why not post the query and the actual execution plan? Chances are, folks here will make suggestions to improve performance - and you are very likely to learn something useful too.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • Hi

    I got the things about view. But what about the tempdb details. How can i identify whether the tempdb is full or not?

  • Are those questions part of an interview?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Hi,

    Here you go:

    use tempdb

    select name,(size*8)/1024 as Current_Size_MB,(max_size*8)/1024 as Total_Size_MB from sys.database_files

Viewing 6 posts - 1 through 5 (of 5 total)

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