Data and Procedure Cache...

  • Hi,

    I've a table that has lots of records and it's used many times.

    Is it possible to "tell" SQL SERVER to put all that table's data in it's data cache?

    In SQL 7 there was DBCC PINTABLE but in 2005 this was deprecated.

    Thanks,

    Pedro



    If you need to work better, try working less...

  • No there isn't a way to currently do this in SQL Server 2005 or 2008. Your only way to attempt it, and it isn't guaranteed, would be to setup a job in SQL Agent that is called every minute doing a SELECT * from the table, which would keep its use count high and minimize the decrement by the clock hand sweeps which result in it being removed from cache. A large enough hit to the cache could still cause it to be flushed though.

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

  • Also thought of, since the data on that table doesn't change very often and we know when it does (data from a web service call by us), building a CLR with the data in a List, Collection, what ever, and have a method so we could use it like a table.

    But probably it's best o let SQL do the management itself..

    Thanks,

    Pedro



    If you need to work better, try working less...

  • You could also look at using ASP caching:

    http://msdn.microsoft.com/en-us/library/ms178604.aspx

    etc

  • Thanks, we'll look into that...

    What we really are waiting for is MS Velocity... http://msdn.microsoft.com/en-us/data/cc655792.aspx

    When it'll come out?!?! no one knows just yet... MS is always saying "tomorrow" 😀

    Pedro



    If you need to work better, try working less...

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

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