View result cached

Last post 08-02-2007 12:44 AM by ndinakar. 1 replies.

Sort Posts:

  • View result cached

    08-01-2007, 11:35 PM
    • Member
      195 point Member
    • penn433
    • Member since 02-07-2003, 9:33 AM
    • Posts 48

    I am using SQL server 2005. I have a VIEW that joins several tables. One of the table's column can be added dynamically by the user from a GUI interface. However, after a column is added, it does not show up in the VIEW immediately. It will take a while (I haven't figured out exactly how long) before the extra column shows up as the execution result of the VIEW.

     So it seems like SQL server is caching that VIEW's schema. Is there anyway I can make this view always comes back with the latest schema?

    Thanks a lot!

    Penn

  • Re: View result cached

    08-02-2007, 12:44 AM
    Answer
    • All-Star
      46,399 point All-Star
    • ndinakar
    • Member since 05-05-2003, 12:57 PM
    • Redmond, WA
    • Posts 6,857
    • Moderator
      TrustedFriends-MVPs

    you can use WITH RECOMPILE so its not cached but it comes at a price of computation of the query plan every time its executed.

    ***********************
    Dinakar Nethi
    Life is short. Enjoy it.
    ***********************
Page 1 of 1 (2 items)