-
Pinning in SQLSERVER
Is it possible to pin datbase objects such as tables,stored procedures,functions in sqlserver database similar to oracle?If we can can anybody suggest the command to do it in SQLSERVER.
THANKS
-
sp_tableoption 'mytable', 'pintable', true
will pin a table.
I don't know of any way to pin other object types
-
SET @db_id = DB_ID('myDB')
SET @tbl_id = OBJECT_ID('myDB..table1')
DBCC PINTABLE (@db_id, @tbl_id)
-
Be careful. If you don't have enough memory on the server, may affect overall performance.
-
Pinning is only recommended for small static tables like code tables which are frequently used.
You can monitor the performance of your application after pinning tables you want and see what difference it makes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|