On DB2 and Table-Pinning by Robert Catterall

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s