Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003

    Thumbs up Unanswered: Storing SQL statements in memory

    I have a server with a huge amount of memory and I am running SQL Server 2005 Enterprise. I need to know if it is possible to pin a group of most used SQL statements into memory. I know you can pin a table in memory, but is this also possible for just SQL statements.

    Thanks for the help in advance.

  2. #2
    Join Date
    Feb 2004
    One Flump in One Place
    Quote Originally Posted by svanati
    I know you can pin a table in memory, but is this also possible for just SQL statements.
    Actually you can't anymore. The command remains, and SQL Server will merrily tell you that the command executed correctly however it does not pin the table.

    Quote Originally Posted by BoL
    Important: This functionality was introduced for performance in SQL Server version 6.5. DBCC PINTABLE has highly unwanted side-effects. These include the potential to damage the buffer pool. DBCC PINTABLE is not required and has been removed to prevent additional problems. The syntax for this command still works but does not affect the server.
    As far as the statements are concerned - no you can't. Nor would you care. It is the execution plans you care about, not the statements. And these remain in memory until they are aged out\ marked for recompilation.

    For more info check out the Lazy Writer, plan caching and syscacheobjects in BoL and via Google. is a good place to look.

    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jan 2003
    Provided Answers: 17
    Actually, you will want to look up the Procedure Cache in BOL. What you want to do is already built in functionality.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts