caching a view

  • Hi

    I have a view that is used very regularly and joins several tables.

    Is there a way of caching the view to speed it up?

    f there is how often is the cache refreshed and could I refresh the cache if I wanted?

    Thanks in advance

  • No caching mechanisms. You could consider an indexed view, but that's something that you need to carefully analyse to see if it will fit, and there are lots of restrictions.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • The only other way to "cache" a view if you aren't able to index it for any reason, would be to use a procedure to insert the results into a physical table on a schedule. Obviously this would mean that any results would NOT reflect any changes to the underlying data until the next time the procedure was run, so it would depend on how up to date you would want your results to be.

    Follow me on twitter @EvoDBACheck out my blog Natural Selection DBA[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

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