| How to
pin a table into memory? |
|
Pinning frequently
used tables into memory may enhance performance as long as you
have enough memory. Here is the code sample for pinning:
use pubs
DECLARE @db_id int, @tbl_id int
SET @db_id = DB_ID('pubs')
SET @tbl_id = OBJECT_ID('pubs..authors')
DBCC PINTABLE (@db_id, @tbl_id)
|
| Best in the World
in SQL Server Training |
|