On DB2 and Table-Pinning by Robert Catterall
In some non-DB2 DBMS environments, a table that is to be pinned in memory must be explicitly marked as such. With DB2, this is not the case.
How do I pin a DB2 table in memory? Easy – I just assign it to a buffer pool that has enough buffers to hold all the table’s pages. Here’s a very simple example: I have a DB2 table, called XYZ, that occupies 1000 4K pages (the page size doesn’t matter – could be 4K pages, 8K, 16K, whatever). I want to pin this table in memory. I set up buffer pool BP8 (the actual buffer pool name doesn’t matter) with 1000 4K buffers.