将SQL Server数据表驻留内存是SQL Server提供的一项功能,在一般小型系统的开发过程中估计很少会涉及到。这里整理了相关文档资料,演示如何把SQL Server中一个表的所有数据都放入内存中,实现内存数据库,提高实时性。
1, DBCC PINTABLE
Marks a table to be pinned, which means Microsoft SQL Server does not flush the pages for the table from memory.
SyntaxDBCC PINTABLE ( database_id , table_id )
To determine the database ID, use the DB_ID function.
To determine the table ID, use the OBJECT_ID function.
......
阅读全文