total memory(頁數)指定啟動時嘗試取得的總記憶體。1 頁 = 2KB。若 OS 支援動態配置,啟動後可追加記憶體。
sp_configure 'executable codesize')sp_configure 逐項查詢)剩餘記憶體依 procedure cache percent 比例分配:如 20 表 20% 給程序緩衝區、80% 給資料緩衝區。
Server: Number of proc buffers assocated: 556 -- 556KB (每緩衝 76B) → 42256B ≈ 21頁
Server: Number of blocks left for proc headers: 629 -- 629頁
→ 程序緩衝區總計 650頁 ≈ 1.27MB
Server: Memory allocated for the default data cache: 4144kb
若有命名緩衝區,錯誤日誌會逐項列出。亦可用 sp_helpcache 查詢各緩衝區與綁定物件詳情。
開發環境可增程序緩衝區;生產環境宜縮減程序緩衝區擴大資料緩衝區。兩緩衝區大小對整體效能影響極大。